forked from pepae/ShutterAPIHongbao
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwallet.html
166 lines (150 loc) · 4.93 KB
/
wallet.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hongbao Wallet</title>
<style>
/* General Styling */
body {
font-family: 'Arial', sans-serif;
background-color: #ffe6e6; /* Light pink for a festive feel */
color: #333;
margin: 0;
padding: 0;
}
header {
background-color: #d32f2f; /* Hongbao red */
color: white;
padding: 20px;
text-align: center;
font-size: 1.8em;
font-weight: bold;
}
.container {
max-width: 800px;
margin: 20px auto;
background: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
h2 {
color: #d32f2f; /* Match the theme */
font-size: 1.6rem;
margin-bottom: 10px;
font-weight: bold;
}
button {
font-family: 'Arial Black', sans-serif;
background-color: #d32f2f;
color: white;
border: none;
padding: 12px 20px;
font-size: 1.2rem;
border-radius: 6px;
cursor: pointer;
transition: background-color 0.3s, transform 0.2s;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}
button:hover {
background-color: #a52828; /* Darker red */
transform: scale(1.05);
}
textarea, input {
width: 90%;
padding: 12px;
margin: 10px auto;
display: block;
border: 1px solid #ddd;
border-radius: 6px;
font-size: 1rem;
}
textarea {
resize: none;
}
.balance {
font-size: 1.5rem;
font-weight: bold;
color: #d32f2f;
margin-top: 15px;
}
.details {
margin-top: 15px;
font-size: 1rem;
color: #333;
background-color: rgba(211, 47, 47, 0.1); /* Light red background */
padding: 10px;
border-radius: 6px;
text-align: left;
word-wrap: break-word;
}
/* Hongbao Visual */
.hongbao-visual {
background: linear-gradient(145deg, #d32f2f, #e53935);
width: 180px;
height: 240px;
margin: 20px auto;
position: relative;
border-radius: 10px;
border: 2px solid #a52828;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}
.hongbao-visual::before {
content: '';
position: absolute;
width: 0;
height: 0;
border-style: solid;
border-width: 120px 90px 0 90px;
border-color: #b71c1c transparent transparent transparent;
top: 0;
left: 0;
z-index: 10;
}
.hongbao-visual.opened::before {
transform: rotateX(-120deg);
}
.disclaimer-box {
border: 2px dashed #d32f2f;
background-color: #ffecec;
color: #d32f2f;
padding: 10px;
margin-top: 20px;
font-size: 0.9rem;
text-align: left;
border-radius: 6px;
}
</style>
</head>
<body>
<header>Hongbao Wallet</header>
<div class="container">
<h2>Create or Load Wallet</h2>
<div>
<button id="createWallet">Create Wallet</button>
<button id="loadWallet">Load Wallet</button>
</div>
<textarea id="walletOutput" rows="4" placeholder="Your wallet details will appear here" readonly></textarea>
<div class="balance" id="walletBalance">Balance: Loading...</div>
<div class="disclaimer-box">
<strong>Disclaimer:</strong>
<ul>
<li>This is alpha stage, unaudited software. Use it at your own risk.</li>
<li>This wallet is non-custodial, and all keys are stored locally in your browser or exported. If you lose your keys, funds cannot be recovered.</li>
<li>The private key may appear in export or share links, so handle with care.</li>
<li>This app is fully open source and free; whoever hosts it cannot be held liable.</li>
</ul>
</div>
</div>
<div class="container">
<h2>Send Funds</h2>
<input type="text" id="recipient" placeholder="Recipient Address">
<input type="number" id="amount" placeholder="Amount in xDAI">
<button id="sendFunds">Send Funds</button>
<textarea id="transactionOutput" rows="4" placeholder="Transaction details will appear here" readonly></textarea>
</div>
<script src="https://cdn.jsdelivr.net/npm/ethers/dist/ethers.umd.min.js"></script>
<script src="walletmanagement.js"></script>
</body>
</html>