forked from nbd-wtf/satdress
-
Notifications
You must be signed in to change notification settings - Fork 14
/
index.html
263 lines (249 loc) · 8.86 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
<!DOCTYPE html>
<html lang="en">
<head>
<title>Nostdress - Federated Lightning Address Server with Nostr Support</title>
<meta charset="utf-8" />
<link rel="icon" type="image/png" href="https://i.imgur.com/4yaPtA2.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link
rel="stylesheet"
type="text/css"
href="//fonts.googleapis.com/css?family=PT+Sans"
/>
<link rel="stylesheet" href="/static/style.css" />
</head>
<body>
<main id="main">
<div class="title">{{ siteName }}</div>
<script>
</script>
<div class="tagline">Federated Lightning Address Server with Nostr support</div>
<div class="owner">
<a class="owner-button" :href="siteOwnerURL" target="_blank">
Brought to you by <span class="owner-name">{{ siteOwnerName }}</span>
</a>
</div>
<div class="card">
<div class="description">
Use the form below to connect your own node to a
<b>Lightning Address</b>.
</div>
<form action="/grab" method="post">
<div class="field">
<div class="row">
<label for="name"> {{usernameInfo}} </label>
</div>
<div class="domain-wrapper">
<input class="input" name="name" id="name" />
<span v-if="domains.length == 1">@{{ domains[0] }}</span>
<span v-if="domains.length > 1">@</span>
<select
name="domain"
id="domain"
v-if="domains.length > 1"
>
<option v-for="domain in domains" :value="domain">
{{ domain }}
</option>
</select>
</div>
</div>
<div class="field">
<label for="kind"> Node Backend Type </label>
<select name="kind" id="kind" id="kind" v-model="kind">
<option disabled value="">Please select one:</option>
<option value="lnbits">LNbits</option>
<option value="lnd">LND</option>
<option value="commando">Commando (CLN)</option>
<option value="sparko">Sparko (CLN)</option>
<option value="eclair">Eclair</option>
<option value="lnpay">LNPay</option>
<option value="forward">Forward</option>
</select>
</div>
<div v-if="kind == 'forward'">
<div class="field">
<label for="host">
Forward URl
</label>
<input
class="input full-width"
name="host"
id="host"
placeholder="https://walletofsatoshi.com/.well-known/lnurlp/satoshinakamoto58k"
/>
</div>
</div>
<div v-if="kind == 'lnd'">
<div class="field">
<label for="host">
LND REST Host (Protocol + IP/Domain + Port)
</label>
<input
class="input full-width"
name="host"
id="host"
placeholder="http://mylndonionztxrvxtzrs.onion:8080"
/>
</div>
<div class="field">
<label for="macaroon"> Invoice Macaroon (Hex)</label>
<input
class="input full-width"
name="key"
id="macaroon"
placeholder="012312432324"
/>
</div>
</div>
<div v-if="kind == 'sparko' || kind == 'lnbits'">
<div class="field">
<label for="host"> Host (Protocol + IP or Domain + Port) </label>
<input
class="input full-width"
name="host"
id="host"
placeholder="https://10.147.17.32:9737"
/>
</div>
<div class="field">
<label for="key"> Key </label>
<input class="input full-width" name="key" id="key" />
</div>
</div>
<div v-if="kind == 'eclair'">
<div class="field">
<label for="host"> Host (Protocol + IP or Domain + Port) </label>
<input
class="input full-width"
name="host"
id="host"
placeholder="http://myeclair.com"
/>
</div>
<div>
<p>
Don't input your Eclair password here nor expose your Eclair
node carelessly. Follow
<a
href="https://gist.github.com/fiatjaf/8e74740d30763713154de15562e08789#file-exposing-eclair-md"
>these instructions</a
>
instead (or do something better).
</p>
</div>
</div>
<div v-if="kind == 'lnpay'">
<div class="field">
<label for="pak"> Public Access Key (pak) </label>
<input class="input full-width" name="pak" id="pak" />
</div>
<div class="field">
<label for="waki"> Wallet Invoice Key (waki) </label>
<input class="input full-width" name="waki" id="waki" />
</div>
</div>
<div class="field">
<label style="float: right">
This is a new Lightning Address
<input type="checkbox" v-model="isNew" />
</label>
</div>
<div v-if="kind == 'commando'">
<div class="field">
<label for="nodeid">Node ID (pubkey)</label>
<input
class="input full-width"
name="nodeid"
id="nodeid"
placeholder="02c16cca44562b590dd279c942200bdccfd4f990c3a69fad620c10ef2f8228eaff"
/>
</div>
<div class="field">
<label for="host">Node IP + Port</label>
<input
class="input full-width"
name="host"
id="host"
placeholder="10.147.17.32:9735"
/>
</div>
<div class="field">
<label for="rune">Rune</label>
<input class="input full-width" name="rune" id="rune" />
</div>
</div>
<br />
<div class="field" v-if="!isNew">
<label for="pin"> Secret PIN </label>
<input class="input full-width" name="pin" id="pin" />
</div>
<div class="field">
<label for="npub">
Nostr npub (optional for Nostr services)
</label>
<input
class="input full-width"
name="npub"
id="npub"
placeholder="npub123..."
/>
<div class="field" id="nostrnotifications" v-if="notifynostr == 'true'" >
<label style="float: right">
Get notifed on Nostr</label>
<label style="float: left">
Zaps with Comments
<input type="checkbox" id="notifycomments" name="notifycomments" v-model="notifycomments" />
</label>
<label style="float: left">
Zaps without Comments
<input type="checkbox" id="notifyzaps" name="notifyzaps" v-model="notifyzaps" />
</label>
<label style="float: left">
Non-Zaps
<input type="checkbox" id="notifynonzaps" name="notifynonzaps" v-model="notifynonzaps" checked/>
</label>
</label>
</div>
</div>
<button class="submit" v-if="allowregistration == 'true' || !isNew " >Submit</button>
</div>
<div class="field"> <label style="float: left" v-if="allowregistration == 'false' && isNew">
Registration has been deactivated by adminsitrator for this domain</label></div>
</form>
<div class="resources">
<a
class="resource-button"
href="https://github.com/andrerfneves/lightning-address#readme"
target="_blank"
>
Lightning Address Documentation
</a>
<a
class="resource-button"
target="_blank"
href="https://github.com/believethehype/nostdress"
>
Host this server on your domain!
</a>
</div>
</main>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/3.2.2/vue.global.prod.min.js"></script>
<script>
const initial = {} // REPLACED WITH SERVER DATA //
const Main = {
data() {
return {
kind: 'lnd',
isNew: true,
...initial
}
},
mounted() {
this.kind = ''
}
}
Vue.createApp(Main).mount('#main')
</script>
</body>
</html>