From 6c4eeaab95c2e8babf484e7dd8a6f5a300a40dcd Mon Sep 17 00:00:00 2001 From: polarDefender Date: Tue, 23 Apr 2024 19:55:27 +0200 Subject: [PATCH 01/10] added web view --- src/auth.ts | 4 + static/LightningPub.png | Bin 0 -> 3369 bytes static/connect.html | 47 +++++++++++ static/index.html | 49 ++++++++++++ static/pub_logo.png | Bin 0 -> 14937 bytes static/script.js | 10 +++ static/styles.css | 168 ++++++++++++++++++++++++++++++++++++++++ 7 files changed, 278 insertions(+) create mode 100644 static/LightningPub.png create mode 100644 static/connect.html create mode 100644 static/index.html create mode 100644 static/pub_logo.png create mode 100644 static/script.js create mode 100644 static/styles.css diff --git a/src/auth.ts b/src/auth.ts index febe1e5f..e98e1652 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -1,11 +1,15 @@ +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' import { getLogger } from './services/helpers/logger.js' + 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)) } }, diff --git a/static/LightningPub.png b/static/LightningPub.png new file mode 100644 index 0000000000000000000000000000000000000000..1cbc35de1f30c44cda6e5ae49f7effa1500d6d6c GIT binary patch literal 3369 zcmeAS@N?(olHy`uVBq!ia0y~yVCH9FVDRH$V_;xNGtg>cU|?*`baoE#baqxKD9TUE z%t>Wn(3n^|(bnUzgGAf?WnQk@Tx9`;Cjw%(C}=%e5vt+T8lb)9RYK8Ad6P_!pcom} z>rKt}-J$H_>9Mjgtd1YpkDNX0dC}GDkDlh1j<0=>7r3-Hbh_&KNyY(d?V{__dtfzWc5fVXt@DyKkShQR0DcXZp;T)%e+@U1IH&-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bixjgxL*I&3TicS7Y#DS|zpY#KJoM^ycH0J!+3(lcXfNq>8mSx$_4CHKJR!Gcx4><=4We8%A2;5~Vd`N?EmIhD*0=U)9p);tn(<8kTmnkCykp5@Hs z)>*QB!87T`>lc1+Nz8u6Ag)^J7P@wG#f57z*33WcWh@r7UjLR5`qt!>ut$;9-j7SA z&YyeLKUs$9k8;5of%Xc~g4#)oSG`J8&hpE-uljeMZ)oXvo&SCFFGd^w>h?Uxde8Le zx8DrQnU+V|WMu0<@^0{6cGGd+iRs-|e|pxi$4!62R`uA4UG~{djvs!L_ODu{FA-Rr z^jj~}XT%ad_R%F}|+ylXb&$k=b^7Cnv9dW!BB^IV<8ZL$78xerJsC>9D-m6LDZ$ zdeh8Pa%};(>U2O!fbX^C0qusXZinY&+*)ScQZ-L;$}*Gdj~pkt-Hwc9)M3jrl6vMc z>6X^X#SOK$gWlTTv7WSN-O`QGVWIN!%`)YMq9=aWmR!Af?$z4ATiNYg^9AK*3g0gG zZDQZke*9E-gJksotYzKpwdtES%}k7!p3Jg7cgNjxo^H16-hy<5!d&Vj8AwU-i zpI4jA?=FwIlM!X=IQMGk0qzFx-ZsmPwc+i*wPI&T{oL>K)HxH<%zgJ%pim5&@=f=L(v(I0iZdITuKKpF@kAlg)I&#M>Dw7}8 zTwcjpyK~v9b4>r3j?%~Vb@;}rc%nU6}3pM>`H*K@-*53>NU{#4t;|U(o|lyW*elCy_@Wj5_6P$5 O1B0ilpUXO@geCxruwCf@ literal 0 HcmV?d00001 diff --git a/static/connect.html b/static/connect.html new file mode 100644 index 00000000..9e6a60e5 --- /dev/null +++ b/static/connect.html @@ -0,0 +1,47 @@ + + + + + + + + + + + Lightning.Pub + + + +
+ Lightning Pub logo + Lightning Pub logo +
+ +
+
+

Connect

+

To access the dashboard, use ShockWallet and tap the logo 3 times.

+

Scan the QR with ShockWallet to insert the connection details.

+
+ +
+ +
+
+

strfry.shock.network
npub123abcdefghhhhhhhhhhhhhhh


+

Note: Code contains a one-time pairing secret.

+
+ +
+ + +
+ + + + + + + \ No newline at end of file diff --git a/static/index.html b/static/index.html new file mode 100644 index 00000000..54674617 --- /dev/null +++ b/static/index.html @@ -0,0 +1,49 @@ + + + + + + + + + + + Lightning.Pub + + + +
+ Lightning Pub logo + Lightning Pub logo +
+ +
+
+

Setup

+

To manage your Pub, you will connect a via remote dashboard.

+

Confirm a few things to generate a connection string:

+
+ +
+ +
+

Use default managed relay,
1000 sats per month paid automatically after grace period.

+
+ + +
+

Or, enter a custom relay:

+


+ +

Need Help?

+
+ +
+ + +
+ + \ No newline at end of file diff --git a/static/pub_logo.png b/static/pub_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..36cc43b4e6dc07f88eeb587f2e6adb81907a6324 GIT binary patch literal 14937 zcmeAS@N?(olHy`uVBq!ia0y~yV030+U|hn%#=yX^y2#y@fkAdxRY*ihP-3}4K~a8M zW=^U?No7H*LTW{38UsVct);UwCrR%vYW<%q8po8TGOgM0koAX8f9ERQe0A+=_l`|h zCwWXfs?>1C#+j+;dHuiNyZ%24=f1c*X4ciX)z8D4cliWlq zH{CaX^+#p~)8Bp1c=}_X%HM4#zP|q0zkYYXKbfiNFZVz1uU&ew|GIA5N2!bXtJm9q&)a=| z&dj4HrY>Fg-m`YuC!5E+elF3NU&OQa*RlDBbZ>pW{L^q#mEhL5)93$LbHQ09#{9{K z!yM*wo)@+r6)3jRGn;p02gk&?EmxBIwKeM^?H?YSR(0!S$D^uN+oS6@wmi??9slm9 z+2h&e4=zdUh5pc0BwW;5?PA4k9lw2s>K~`3FDzDti4Q+cov`rjcisr4eY*@KRw=SC5)0xq{UMgj z-PmfvWFoOED@~{|!0Qf=(X%O98#k_4|4doeX8JLq%9|gp65Le0R$ZARxX^J!k=_&k z({6mdlf3knUb)mYHO|e~^m=8dv@uz%+2RFdd#019$C6Ib@lp>qzyz9RSG-B0>}IB~ubZR^Ow!gNCvSHij9@XX!kZHfA*P`Th zzbyarypn3o=WOBYdN-=a2Nm~R<1Uvz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?QCr=6iiVM_8Q7N@DPt+Nwm?CM+N1TxuS#ii8+#ypq9CWUf1MYerx6lhts zpUeEHfDqHdRSr9T8ol9D`rxQ>JcY9*Ycp5*!40pgHgP#>oEDH_S{Sv~>3GVH=73#y zu2=t?U;4w5PoZVOueFEnPFM6`aXQPfFxlvgqekx`0S%^wY0<5xH}y2Hy!G3;qdA~f zvBZZ>kz?sa2_`p%D>|zSUKs8?RVaB&A*7x|b~39|=Co9c&sL!H(GzOH+h*Lv;Uu8N zerRRi$q$SRO^n|29OQ92y8h5hgBAe})gXy5b234S~EzUQfCIzWMDuqbWckr}d$+LKCP~ zotl!!RmDS zLzZHbU<*^CO&ilf2M*`P00B^;EC4QnAqiB3gVj+2T!FAUIfBZ3G-WJMWh`K2O$t0v zWeRZ9I6$U>l{FbaO=Bn#P0$c<3NR4iVAPP{YGDxJVRd5QYGYDlV0CU3sB2p2z~OK( zK%r%Rf`&kozkvwHLUjqQmIJ~(tWGyL+n5x;usAmgRDqP)ftpJ56IK*(JXDv^5(Ami z)dDghNs(ni!U_*0;Z}i$riF_XTNWg&h~Qw pVjubd@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; + color: #999999; + text-align: center; + box-shadow: 0px 0px 2px rgba(0,0,0,1); +} + +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: 1px 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; +} + +/* Hide the default checkbox */ +.checkbox input[type="checkbox"] { + display: none; +} + +/* Create a new box */ +.checkbox label { + position: relative; +} + +.checkbox label::before { + content: ""; + display: inline-block; + width: 20px; + height: 20px; + margin-right: 10px; + background-color: transparent; + border: 1px solid #a3a3a3; + border-radius: 5px; +} + +/* Display a checkmark when the checkbox is checked */ +.checkbox input[type="checkbox"]:checked + label::after { + content: "✔"; + color: #a012c7; + font-size: 20px; + position: absolute; + left: 1px; + top: -11px; + width: 20px; + height: 20px; + text-align: center; +} + +.line { + margin-block: 30px; + background: var(--gradient); + width: 347px; + height: 2px; + margin-inline: auto; +} + +.marked { + color: var(--color-marked); +} + +.linked { + color: var(--color-linked); +} + +.setup-footer>p { + line-height: 4px; +} + +.setup-header>h2 { + margin-block-start: 20px; +} + +#qrcode { + display: flex; + margin: auto; + justify-content: center; + margin-block-start: 40px; + margin-block-end: 15px; +} From 98dd2705b476dd7f0579cd2e76b23130cfb0009d Mon Sep 17 00:00:00 2001 From: polarDefender Date: Mon, 6 May 2024 03:11:19 -0700 Subject: [PATCH 02/10] added docker file --- .dockerignore | 4 ++++ Dockerfile | 11 +++++++++++ 2 files changed, 15 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..45ce9d45 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +.git +.github +build +node_modules diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..ae743c04 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM node:latest + +WORKDIR /app + +COPY package*.json /app + +RUN npm i + +COPY . /app + +CMD [ "npm", "start" ] From 2abd354134efcf6bcecaa1b87c8dc48ed00aa780 Mon Sep 17 00:00:00 2001 From: polarDefender Date: Mon, 6 May 2024 03:19:16 -0700 Subject: [PATCH 03/10] added umbrel-files --- lightning-pub/docker-compose.yml | 22 ++++++++++++++++++ lightning-pub/umbrel-app.yml | 38 ++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 lightning-pub/docker-compose.yml create mode 100644 lightning-pub/umbrel-app.yml diff --git a/lightning-pub/docker-compose.yml b/lightning-pub/docker-compose.yml new file mode 100644 index 00000000..82c87720 --- /dev/null +++ b/lightning-pub/docker-compose.yml @@ -0,0 +1,22 @@ +version: "3.7" +services: + app_proxy: + environment: + APP_HOST: lightning-pub_server_1 + APP_PORT: 8090 + + server: + image: bixie/lightning-pub:latest@sha256:9eac671645d31d1caa4c99b354d174b49d0c258486503994515aee35f481f847 + 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: 8090 + restart: on-failure + stop_grace_period: 1m diff --git a/lightning-pub/umbrel-app.yml b/lightning-pub/umbrel-app.yml new file mode 100644 index 00000000..f1dc7365 --- /dev/null +++ b/lightning-pub/umbrel-app.yml @@ -0,0 +1,38 @@ + manifestVersion: 1 +id: lightning-pub +category: finance +name: Lightning Pub +version: "3.3.0" +tagline: Simple, database-free blockchain explorer +description: >- + BTC RPC Explorer is a full-featured, self-hosted explorer for the + Bitcoin blockchain. With this explorer, you can explore not just the + blockchain database, but also explore the functional capabilities of your + Umbrel. + + It comes with a network summary dashboard, detailed view of blocks, transactions, addresses, along with analysis tools for viewing stats on miner activity, mempool summary, with fee, size, and age breakdowns. You can also search by transaction ID, block hash/height, and addresses. + + It's time to appreciate the "fullness" of your node. +releaseNotes: >- + Dark mode is finally here! Easily switch between your preferred mode + in one click. + + This version also includes lots of minor styling improvements, better + error handling, and several bugfixes. +developer: Dan Janosik +website: https://explorer.btc21.org +dependencies: + - bitcoin + - lightning +repo: https://github.com/janoside/btc-rpc-explorer +support: https://github.com/janoside/btc-rpc-explorer/discussions +port: 8090 +gallery: + - 1.jpg + - 2.jpg + - 3.jpg +path: "" +defaultUsername: "" +defaultPassword: "" +submitter: Umbrel +submission: https://github.com/getumbrel/umbrel/pull/334 \ No newline at end of file From d2d2926dfc8fdd2f58848c932b8a0b2e9408ed6b Mon Sep 17 00:00:00 2001 From: polarDefender Date: Tue, 7 May 2024 08:05:00 -0700 Subject: [PATCH 04/10] added readme file for test umberl --- README.umbrel.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 README.umbrel.md diff --git a/README.umbrel.md b/README.umbrel.md new file mode 100644 index 00000000..6d532ef5 --- /dev/null +++ b/README.umbrel.md @@ -0,0 +1,54 @@ +### Install multipass on the machine (Linux or MacOS) +```sh +snap install multipass +``` + +### Clone the umbrel from the repo and run it on the machine + +https://github.com/getumbrel/umbrel + +```sh +cd ~ +git clone https://github.com/getumbrel/umbrel +cd umbrel +npm run vm:provision +``` + +### Install Bitcoin Node and Lightning Node on the UmbrelOS +Please input the http://umbrel-dev.local/ on your browser. + +You can install following two apps on the app store. +- Bitcoin Node +- LIghtning Node + + +### Transfer the `lightning-pub` folder into the Umbrel virtual machine +```sh +multipass transfer -r umbrel-dev:/home/ubuntu/umbrel/packages/umbreld/data/app-stores/getumbrel-umbrel-apps-github-53f74447/ +``` + +You can get the path of lignthing-pub with following commands +```sh +cd +cd lightning-pub +pwd +``` + +### Install the package with docker-compose.yml and umbrel-app.yml files +Just check that following 2 files exists on the folder you transferred into Umbrel. + +And then, + +```sh +cd ~ +cd umbrel +npm run vm:trpc apps.install.mutate -- --appId lightning-pub +``` + +### Open the app on the app store + +You can run the app on the Umbrel. + +To check if it's running, go to the following url on the browser. + +http://umbrel-dev.local:8090/ \ No newline at end of file From a836df5d594b291ceba695a356399325069b7c5b Mon Sep 17 00:00:00 2001 From: "Justin (shocknet)" Date: Wed, 8 May 2024 16:42:31 -0400 Subject: [PATCH 05/10] ffs --- {lightning-pub => Umbrel}/docker-compose.yml | 8 ++--- Umbrel/umbrel-app.yml | 36 +++++++++++++++++++ lightning-pub/umbrel-app.yml | 38 -------------------- tsconfig.json | 2 +- 4 files changed, 41 insertions(+), 43 deletions(-) rename {lightning-pub => Umbrel}/docker-compose.yml (74%) create mode 100644 Umbrel/umbrel-app.yml delete mode 100644 lightning-pub/umbrel-app.yml diff --git a/lightning-pub/docker-compose.yml b/Umbrel/docker-compose.yml similarity index 74% rename from lightning-pub/docker-compose.yml rename to Umbrel/docker-compose.yml index 82c87720..66556f1e 100644 --- a/lightning-pub/docker-compose.yml +++ b/Umbrel/docker-compose.yml @@ -2,11 +2,11 @@ version: "3.7" services: app_proxy: environment: - APP_HOST: lightning-pub_server_1 - APP_PORT: 8090 + APP_HOST: lightning-pub + APP_PORT: 1776 server: - image: bixie/lightning-pub:latest@sha256:9eac671645d31d1caa4c99b354d174b49d0c258486503994515aee35f481f847 + image: volumes: - "${APP_DATA_DIR}/data:/data" - "${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro" @@ -17,6 +17,6 @@ services: LND_MACAROON_PATH: "/lnd/data/chain/bitcoin/${APP_BITCOIN_NETWORK}/admin.macaroon" DATABASE_FILE: "/data/db.sqlite" METRICS_DATABASE_FILE: "/data/metrics.sqlite" - PORT: 8090 + PORT: 1776 restart: on-failure stop_grace_period: 1m diff --git a/Umbrel/umbrel-app.yml b/Umbrel/umbrel-app.yml new file mode 100644 index 00000000..5bb9ee2e --- /dev/null +++ b/Umbrel/umbrel-app.yml @@ -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 \ No newline at end of file diff --git a/lightning-pub/umbrel-app.yml b/lightning-pub/umbrel-app.yml deleted file mode 100644 index f1dc7365..00000000 --- a/lightning-pub/umbrel-app.yml +++ /dev/null @@ -1,38 +0,0 @@ - manifestVersion: 1 -id: lightning-pub -category: finance -name: Lightning Pub -version: "3.3.0" -tagline: Simple, database-free blockchain explorer -description: >- - BTC RPC Explorer is a full-featured, self-hosted explorer for the - Bitcoin blockchain. With this explorer, you can explore not just the - blockchain database, but also explore the functional capabilities of your - Umbrel. - - It comes with a network summary dashboard, detailed view of blocks, transactions, addresses, along with analysis tools for viewing stats on miner activity, mempool summary, with fee, size, and age breakdowns. You can also search by transaction ID, block hash/height, and addresses. - - It's time to appreciate the "fullness" of your node. -releaseNotes: >- - Dark mode is finally here! Easily switch between your preferred mode - in one click. - - This version also includes lots of minor styling improvements, better - error handling, and several bugfixes. -developer: Dan Janosik -website: https://explorer.btc21.org -dependencies: - - bitcoin - - lightning -repo: https://github.com/janoside/btc-rpc-explorer -support: https://github.com/janoside/btc-rpc-explorer/discussions -port: 8090 -gallery: - - 1.jpg - - 2.jpg - - 3.jpg -path: "" -defaultUsername: "" -defaultPassword: "" -submitter: Umbrel -submission: https://github.com/getumbrel/umbrel/pull/334 \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index d6a10f46..1bff3bae 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -68,4 +68,4 @@ "exclude": [ "./tests" ], -} \ No newline at end of file +} From 0c1d9166bebd0063fcb85dbb64d303e08098c9b1 Mon Sep 17 00:00:00 2001 From: "Justin (shocknet)" Date: Wed, 8 May 2024 16:44:19 -0400 Subject: [PATCH 06/10] ffs --- README.umbrel.md | 54 ------------------------------------------------ 1 file changed, 54 deletions(-) delete mode 100644 README.umbrel.md diff --git a/README.umbrel.md b/README.umbrel.md deleted file mode 100644 index 6d532ef5..00000000 --- a/README.umbrel.md +++ /dev/null @@ -1,54 +0,0 @@ -### Install multipass on the machine (Linux or MacOS) -```sh -snap install multipass -``` - -### Clone the umbrel from the repo and run it on the machine - -https://github.com/getumbrel/umbrel - -```sh -cd ~ -git clone https://github.com/getumbrel/umbrel -cd umbrel -npm run vm:provision -``` - -### Install Bitcoin Node and Lightning Node on the UmbrelOS -Please input the http://umbrel-dev.local/ on your browser. - -You can install following two apps on the app store. -- Bitcoin Node -- LIghtning Node - - -### Transfer the `lightning-pub` folder into the Umbrel virtual machine -```sh -multipass transfer -r umbrel-dev:/home/ubuntu/umbrel/packages/umbreld/data/app-stores/getumbrel-umbrel-apps-github-53f74447/ -``` - -You can get the path of lignthing-pub with following commands -```sh -cd -cd lightning-pub -pwd -``` - -### Install the package with docker-compose.yml and umbrel-app.yml files -Just check that following 2 files exists on the folder you transferred into Umbrel. - -And then, - -```sh -cd ~ -cd umbrel -npm run vm:trpc apps.install.mutate -- --appId lightning-pub -``` - -### Open the app on the app store - -You can run the app on the Umbrel. - -To check if it's running, go to the following url on the browser. - -http://umbrel-dev.local:8090/ \ No newline at end of file From a540ba674aec0d0efe59ccc77e9337f14cfcd12e Mon Sep 17 00:00:00 2001 From: "Justin (shocknet)" Date: Wed, 8 May 2024 16:47:22 -0400 Subject: [PATCH 07/10] ver --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ae743c04..935ab8ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:latest +FROM node:18 WORKDIR /app From b4628eae80508df9fa414d6e709a7f001ee90e4c Mon Sep 17 00:00:00 2001 From: polarDefender Date: Thu, 16 May 2024 11:47:56 -0700 Subject: [PATCH 08/10] add push.yml for iamge push to github container registry --- .github/workflows/push.yml | 47 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/push.yml diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml new file mode 100644 index 00000000..5ee85b5b --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,47 @@ + +name: Create and publish a Docker image + +on: + push: + branches: ['umbrel-works'] + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + attestations: write + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Log in to the Container registry + uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Build and push Docker image + id: push + uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + From e570167a5e8461b0e534e84f767a1a8aaf1ca565 Mon Sep 17 00:00:00 2001 From: polarDefender Date: Thu, 16 May 2024 11:59:18 -0700 Subject: [PATCH 09/10] update docker compose file --- Umbrel/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Umbrel/docker-compose.yml b/Umbrel/docker-compose.yml index 66556f1e..7c569e5c 100644 --- a/Umbrel/docker-compose.yml +++ b/Umbrel/docker-compose.yml @@ -6,7 +6,7 @@ services: APP_PORT: 1776 server: - image: + image: ghcr.io/shocknet/lightning.pub:umbrel-works volumes: - "${APP_DATA_DIR}/data:/data" - "${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro" From c96c340a43c7b73fb7e66868fd7013ad98ad9bd3 Mon Sep 17 00:00:00 2001 From: polarDefender Date: Fri, 17 May 2024 13:29:33 -0700 Subject: [PATCH 10/10] added web pages --- static/backup.html | 100 ++++++++++++ static/connect.html | 92 +++++++---- static/css/backup.css | 18 +++ static/css/liquidity.css | 27 ++++ static/css/seed.css | 35 +++++ static/css/styles.css | 244 ++++++++++++++++++++++++++++++ static/{ => img}/LightningPub.png | Bin static/img/back.svg | 1 + static/img/close.svg | 1 + static/{ => img}/pub_logo.png | Bin static/img/question.svg | 1 + static/index.html | 113 +++++++++----- static/js/backup.js | 11 ++ static/js/liquidity.js | 9 ++ static/{ => js}/script.js | 6 +- static/js/seed.js | 15 ++ static/liquidity.html | 93 ++++++++++++ static/seed.html | 181 ++++++++++++++++++++++ static/styles.css | 168 -------------------- 19 files changed, 877 insertions(+), 238 deletions(-) create mode 100644 static/backup.html create mode 100644 static/css/backup.css create mode 100644 static/css/liquidity.css create mode 100644 static/css/seed.css create mode 100644 static/css/styles.css rename static/{ => img}/LightningPub.png (100%) create mode 100644 static/img/back.svg create mode 100644 static/img/close.svg rename static/{ => img}/pub_logo.png (100%) create mode 100644 static/img/question.svg create mode 100644 static/js/backup.js create mode 100644 static/js/liquidity.js rename static/{ => js}/script.js (66%) create mode 100644 static/js/seed.js create mode 100644 static/liquidity.html create mode 100644 static/seed.html delete mode 100644 static/styles.css diff --git a/static/backup.html b/static/backup.html new file mode 100644 index 00000000..9f09e81e --- /dev/null +++ b/static/backup.html @@ -0,0 +1,100 @@ + + + + + + + + + + + + Lightning.Pub + + + + +
+ Lightning Pub logo + Lightning Pub logo +
+ +
+
+ +

Backup

+

+ It looks like this is a + new node, it's important + establish backups. +

+
+ +
+ +
+
+
+ In addition to your seed phrase, you'll need a channel backup to +
+
+ recover funds should your node experience a hardware failure. +
+
+
+ It's important always to have the latest version of this backup, +
+
+ fortunately they're small enough to be cached on the Nostr relay. +
+
+
+ If you did not choose the developers relay, be sure your relay has + adequate storage policies to hold NIP78 events. +
+
+
+ +
+ +
+
+ +
+
+ +
+ +
+

Need Help?

+
+ + + + diff --git a/static/connect.html b/static/connect.html index 9e6a60e5..a7048a81 100644 --- a/static/connect.html +++ b/static/connect.html @@ -1,47 +1,77 @@ - - + + - - - - + + + + Lightning.Pub - - - + + + +
- Lightning Pub logo - Lightning Pub logo + Lightning Pub logo + Lightning Pub logo
-
-

Connect

-

To access the dashboard, use ShockWallet and tap the logo 3 times.

-

Scan the QR with ShockWallet to insert the connection details.

-
- -
+
+ +

Connect

+

+ Who's the Nostr user that owns this node, can recover the backups, and + connect to manage it? +

+
-
-
-

strfry.shock.network
npub123abcdefghhhhhhhhhhhhhhh


-

Note: Code contains a one-time pairing secret.

-
+
-
+
+
+

+ strfry.shock.network
npub123abcdefghhhhhhhhhhhhhhh +

+
+

Note: Code contains a one-time pairing secret.

+
- +
- +
+ +
+

Need Help?

+
+ - - - \ No newline at end of file + + + diff --git a/static/css/backup.css b/static/css/backup.css new file mode 100644 index 00000000..08f98a8b --- /dev/null +++ b/static/css/backup.css @@ -0,0 +1,18 @@ +.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; +} + diff --git a/static/css/liquidity.css b/static/css/liquidity.css new file mode 100644 index 00000000..495f1f93 --- /dev/null +++ b/static/css/liquidity.css @@ -0,0 +1,27 @@ +.question-box { + display: inline-block; + position: relative; + top: -8px; + left: -4px; +} + +.question-box .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; +} + +.question-content .close-button { + position: absolute; + top: 4px; + right: 0; +} diff --git a/static/css/seed.css b/static/css/seed.css new file mode 100644 index 00000000..9f7d4d19 --- /dev/null +++ b/static/css/seed.css @@ -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; +} diff --git a/static/css/styles.css b/static/css/styles.css new file mode 100644 index 00000000..fae30a11 --- /dev/null +++ b/static/css/styles.css @@ -0,0 +1,244 @@ +: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 { + margin-block-start: 15px; + font-family: Montserrat; + background-color: var(--background-color); + color: var(--color); + text-align: center; + overflow: scroll; +} + +header { + background-color: var(--background-color); + padding-inline: 2%; + display: flex; + flex-direction: row; + align-items: center; + gap: 1rem; +} + +main { + max-width: 500px; + width: 100%; + margin-inline: auto; +} + +* { + 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; + 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: 0; + left: 0; +} + +.setup-header > h2 { + margin-block-start: 20px; +} + +.setup-header .header-title { + font-size: 16px; + text-align: center; + text-shadow: 0px 0px 2px rgba(0, 0, 0, 1); +} + +#qrcode { + display: flex; + margin: auto; + justify-content: center; + margin-block-start: 40px; + margin-block-end: 15px; +} + +.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; + margin-top: 18px; +} + +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; +} \ No newline at end of file diff --git a/static/LightningPub.png b/static/img/LightningPub.png similarity index 100% rename from static/LightningPub.png rename to static/img/LightningPub.png diff --git a/static/img/back.svg b/static/img/back.svg new file mode 100644 index 00000000..dd311c59 --- /dev/null +++ b/static/img/back.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/img/close.svg b/static/img/close.svg new file mode 100644 index 00000000..1ff717e6 --- /dev/null +++ b/static/img/close.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/pub_logo.png b/static/img/pub_logo.png similarity index 100% rename from static/pub_logo.png rename to static/img/pub_logo.png diff --git a/static/img/question.svg b/static/img/question.svg new file mode 100644 index 00000000..aafbaff4 --- /dev/null +++ b/static/img/question.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/index.html b/static/index.html index 54674617..092684a5 100644 --- a/static/index.html +++ b/static/index.html @@ -1,49 +1,90 @@ - - + + - - - - + + + + Lightning.Pub - - - + + +
- Lightning Pub logo - Lightning Pub logo + Lightning Pub logo + Lightning Pub logo
-
-

Setup

-

To manage your Pub, you will connect a via remote dashboard.

-

Confirm a few things to generate a connection string:

-
- -
+
+

Setup

+

+ Let's confirm some things before we start this Pub +

+
-
-

Use default managed relay,
1000 sats per month paid automatically after grace period.

-
- - -
-

Or, enter a custom relay:

-


- -

Need Help?

-
+
-
+
+
+ give this node a name that wallet users will see: + +
- +
+ If you want to use a specific Nostr relay, enter it now: + +
+ +
+ +
+ +
+ + +
- - \ No newline at end of file + +
+ +
+

Need Help?

+
+ + diff --git a/static/js/backup.js b/static/js/backup.js new file mode 100644 index 00000000..9579648f --- /dev/null +++ b/static/js/backup.js @@ -0,0 +1,11 @@ +$(() => { + $("#backup").click(() => { + const checked = $("#backup").prop("checked"); + const nextButton = $("#next-button"); + if (checked) { + nextButton.removeClass("hidden-button"); + } else { + nextButton.addClass("hidden-button"); + } + }); +}); diff --git a/static/js/liquidity.js b/static/js/liquidity.js new file mode 100644 index 00000000..4418542a --- /dev/null +++ b/static/js/liquidity.js @@ -0,0 +1,9 @@ +$(() => { + $("#show-question").click(() => { + $("#question-content").show(); + }); + + $("#close-question").click(() => { + $("#question-content").hide(); + }); +}); diff --git a/static/script.js b/static/js/script.js similarity index 66% rename from static/script.js rename to static/js/script.js index f21f547c..2b980019 100644 --- a/static/script.js +++ b/static/js/script.js @@ -3,8 +3,8 @@ $(document).ready(function() { text: "strfry.shock.network npub123abcdefghhhhhhhhhhhhhhh", width: 157, height: 157, - colorDark : "#ffffff", - colorLight : "#000000", - correctLevel : QRCode.CorrectLevel.H + colorDark : "#000000", + colorLight : "#ffffff", + // correctLevel : QRCode.CorrectLevel.H }); }); \ No newline at end of file diff --git a/static/js/seed.js b/static/js/seed.js new file mode 100644 index 00000000..2574aa40 --- /dev/null +++ b/static/js/seed.js @@ -0,0 +1,15 @@ +$(() => { + $("#reveal-button").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"); + } + }) +}); diff --git a/static/liquidity.html b/static/liquidity.html new file mode 100644 index 00000000..46bae1e5 --- /dev/null +++ b/static/liquidity.html @@ -0,0 +1,93 @@ + + + + + + + + + + + + Lightning.Pub + + + + +
+ Lightning Pub logo + Lightning Pub logo +
+ +
+
+ +

Liquidity

+

+ How do you want to manage Lightning connectivity? +

+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+

Need Help?

+
+ + + + diff --git a/static/seed.html b/static/seed.html new file mode 100644 index 00000000..97b07183 --- /dev/null +++ b/static/seed.html @@ -0,0 +1,181 @@ + + + + + + + + + + + + Lightning.Pub + + + + +
+ Lightning Pub logo + Lightning Pub logo +
+ +
+
+ +

Seed Phrase

+

+ Store your seed phrase somewhere safe, you'll need it if something + ever goes wrong with your nodes hard drive. +

+
+ +
+ +
+
+
+ 1 + albert +
+
+ 1 + albert +
+
+ 1 + albert +
+
+ 1 + albert +
+
+ 1 + albert +
+
+ 1 + albert +
+
+ 1 + albert +
+
+ 1 + albert +
+
+ 1 + albert +
+
+ 1 + albert +
+
+ 1 + albert +
+
+ 1 + albert +
+
+ 1 + albert +
+
+ 1 + albert +
+
+ 1 + albert +
+
+ 1 + albert +
+
+ 1 + albert +
+
+ 1 + albert +
+
+ 1 + albert +
+
+ 1 + albert +
+
+ 1 + albert +
+
+ 1 + albert +
+
+ 1 + albert +
+
+ 1 + albert +
+
+ + + +
+
+ +
+ +
+
+ +
+
+ +
+ +
+

Need Help?

+
+ + + + diff --git a/static/styles.css b/static/styles.css deleted file mode 100644 index 80fef982..00000000 --- a/static/styles.css +++ /dev/null @@ -1,168 +0,0 @@ -: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 { - margin-block-start: 15px; - font-family: Montserrat; - background-color: var(--background-color); - color: var(--color); - text-align: center; - overflow: scroll; -} - -header { - background-color: var(--background-color); - padding-inline: 2%; - display: flex; - flex-direction: row; - align-items: center; - gap: 1rem; -} - -main { - max-width: 700px; - width: 100%; - margin-inline: auto; -} - -@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; - color: #999999; - text-align: center; - box-shadow: 0px 0px 2px rgba(0,0,0,1); -} - -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: 1px 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; -} - -/* Hide the default checkbox */ -.checkbox input[type="checkbox"] { - display: none; -} - -/* Create a new box */ -.checkbox label { - position: relative; -} - -.checkbox label::before { - content: ""; - display: inline-block; - width: 20px; - height: 20px; - margin-right: 10px; - background-color: transparent; - border: 1px solid #a3a3a3; - border-radius: 5px; -} - -/* Display a checkmark when the checkbox is checked */ -.checkbox input[type="checkbox"]:checked + label::after { - content: "✔"; - color: #a012c7; - font-size: 20px; - position: absolute; - left: 1px; - top: -11px; - width: 20px; - height: 20px; - text-align: center; -} - -.line { - margin-block: 30px; - background: var(--gradient); - width: 347px; - height: 2px; - margin-inline: auto; -} - -.marked { - color: var(--color-marked); -} - -.linked { - color: var(--color-linked); -} - -.setup-footer>p { - line-height: 4px; -} - -.setup-header>h2 { - margin-block-start: 20px; -} - -#qrcode { - display: flex; - margin: auto; - justify-content: center; - margin-block-start: 40px; - margin-block-end: 15px; -}