forked from nbd-wtf/satdress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
206 lines (203 loc) · 6.95 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Satdress - Federated Lightning Address Server</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>
<div class="tagline">Federated Lightning Address Server</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="lnd">LND</option>
<option value="commando">Commando (CLN)</option>
<option value="eclair">Eclair</option>
<option value="lnpay">LNPay</option>
<option value="lnbits">LNbits</option>
<option value="sparko">Sparko (CLN)</option>
</select>
</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 (base64 encoded) </label>
<input
class="input full-width"
name="key"
id="macaroon"
placeholder="V2UgYWxsIGxvdmUgQGZpYXRqYWYhCg=="
/>
</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="http://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>
<button class="submit">Submit</button>
</form>
</div>
<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/fiatjaf/satdress"
>
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>