-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
214 lines (194 loc) · 5.4 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Dice Mnemonic Generator</title>
<style>
body {
font-family: Arial, sans-serif;
max-width: 1200px;
margin: 0 auto;
padding: 20px;
text-align: center;
}
.form-group {
margin-bottom: 20px;
text-align: left;
}
label {
display: block;
margin-bottom: 5px;
}
textarea,
input {
width: 100%;
padding: 10px;
font-size: 16px;
border: 1px solid #ccc;
border-radius: 4px;
}
textarea {
height: 100px;
resize: vertical;
}
button {
padding: 10px 20px;
font-size: 16px;
margin-top: 10px;
}
.counter {
font-size: 14px;
color: #666;
margin-top: 5px;
}
.random-dice-link {
}
/* Notification container styling */
#notification {
position: fixed;
top: 20px;
right: 20px;
width: 300px;
z-index: 1000;
}
/* Notification message styling */
.notification-message {
position: relative;
padding: 15px 20px;
margin-bottom: 10px;
border-radius: 4px;
color: #fff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
animation: fadeIn 0.5s;
}
.notification-success {
background-color: #4caf50;
}
.notification-warning {
background-color: #ff9800;
}
.notification-error {
background-color: #f44336;
}
.notification-success::before {
content: '✔️';
}
.notification-error::before {
content: '❌';
}
/* Close button styling */
.notification-close {
position: absolute;
top: -5px;
right: 5px;
background: none;
border: none;
color: #fff;
font-size: 16px;
cursor: pointer;
padding: 0;
line-height: 1;
}
.notification-close:hover {
color: #eee;
}
/* Fade-in animation */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
table {
border-collapse: collapse;
margin-bottom: 20px;
}
th,
td {
border: 1px solid black;
padding: 10px;
text-align: center;
}
img {
width: 150px;
height: 150px;
}
.editable-cell {
cursor: pointer;
transition: background-color 0.3s;
position: relative;
}
.editable-cell:hover {
background-color: #f0f0f0;
}
.editable-cell::after {
content: '✎';
position: absolute;
top: 2px;
right: 2px;
font-size: 12px;
color: #888;
opacity: 0;
transition: opacity 0.3s;
}
.editable-cell:hover::after {
opacity: 1;
}
.action-cell,
.remove-cell {
vertical-align: top;
}
.action-buttons {
position: sticky;
top: 0;
padding: 5px 0;
background-color: white;
}
</style>
</head>
<body>
<h1>Dice Mnemonic Generator / Validator / Slip-39 Share Generator</h1>
<h2 style="color: red">Experimental: Use at your own risk</h2>
<p>
This tool allows you to generate mnemonics and addresses using dice rolls as a source of entropy. You can either
input your own dice rolls or use the tool to generate a mnemonic, which can then be used to derive Ethereum and
Solana addresses. The tool also supports SLIP-39 for creating backup shares of your seed.
</p>
<div class="form-group">
<label for="diceInput"
>Enter dice rolls (or
<a href="#" onclick="generateRandomDice(); return false;" class="random-dice-link">Random Dice</a>):</label
>
<textarea id="diceInput" placeholder="e.g., 123456" onkeyup="checkInput('dice')" maxlength="200"></textarea>
<div id="diceCounter" class="counter">0/200 dice rolls</div>
</div>
<div class="form-group">
<label for="mnemonicInput">Enter mnemonic (or leave empty to generate from dice):</label>
<textarea id="mnemonicInput" placeholder="Enter your mnemonic phrase" onkeyup="checkInput('mnemonic')"></textarea>
<div id="mnemonicCounter" class="counter">0/24 words</div>
</div>
<!-- Notification Container -->
<div id="notification" style="display: none"></div>
<button onclick="generateAddresses()">Generate Addresses</button>
<div id="output"></div>
<h2>SLIP-39</h2>
<p>
This section allows you to generate SLIP-39 shares from your mnemonic. SLIP-39 is a method for splitting your seed
into multiple shares, which can be used to recover your wallet in case of loss or damage to your primary seed.
</p>
<div class="form-group">
<label for="passphrase">Passphrase (optional):</label>
<input type="text" id="passphrase" placeholder="Enter passphrase" />
</div>
<div class="form-group">
<label for="threshold">Threshold:</label>
<input type="number" id="threshold" value="3" min="1" max="16" />
</div>
<div id="slip39Output" class="mt-3"></div>
</body>
</html>