-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
144 lines (121 loc) · 3.8 KB
/
index.html
File metadata and controls
144 lines (121 loc) · 3.8 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>XVerse PSBT Signer</title>
<style>
body {
font-family: Arial, sans-serif;
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
.social-links {
text-align: center;
margin-bottom: 20px;
}
.social-links p {
margin-bottom: 10px;
color: #555;
font-style: italic;
}
.social-links a {
margin: 0 10px;
text-decoration: none;
}
.social-links img {
width: 32px;
height: 32px;
transition: transform 0.2s;
}
.social-links img:hover {
transform: scale(1.1);
}
button {
background-color: #4CAF50;
border: none;
color: white;
padding: 10px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 10px 2px;
cursor: pointer;
border-radius: 5px;
}
#disconnectButton {
background-color: #f44336;
}
#walletInfo,
#psbtForm {
margin-top: 20px;
padding: 15px;
border: 1px solid #ddd;
border-radius: 5px;
background-color: #f9f9f9;
}
textarea {
width: 100%;
height: 100px;
margin: 10px 0;
padding: 10px;
box-sizing: border-box;
}
label {
display: block;
margin: 10px 0 5px;
}
.hidden {
display: none;
}
#result {
margin-top: 20px;
padding: 15px;
border-radius: 5px;
background-color: #e8f5e9;
}
#error {
color: #d32f2f;
margin-top: 10px;
}
</style>
</head>
<body>
<div class="social-links">
<p>Say hi! Let's build the future of Bitcoin together 🚀</p>
<a href="https://github.com/dcorral" target="_blank" rel="noopener noreferrer">
<img src="https://github.githubassets.com/assets/GitHub-Mark-ea2971cee799.png" alt="GitHub">
</a>
<a href="https://x.com/dct_cpp" target="_blank" rel="noopener noreferrer">
<img src="https://about.x.com/content/dam/about-twitter/x/brand-toolkit/logo-black.png.twimg.1920.png"
alt="X">
</a>
</div>
<h1>XVerse PSBT Signer!</h1>
<button id="connectButton">Connect</button>
<button id="disconnectButton" class="hidden">Disconnect</button>
<div id="walletInfo" class="hidden">
<h3>Wallet Information</h3>
<p><strong>Address:</strong> <span id="walletAddress"></span></p>
<p><strong>Network:</strong> <span id="walletNetwork"></span></p>
</div>
<div id="psbtForm" class="hidden">
<h3>Sign PSBT Transaction</h3>
<form id="signPsbtForm">
<label for="psbtBase64">Base64 PSBT:</label>
<textarea id="psbtBase64" required placeholder="Enter base64 encoded PSBT"></textarea>
<label for="signInputs">Sign Inputs (JSON):</label>
<textarea id="signInputs" required placeholder='{"address1": [0], "address2": [1]}'></textarea>
<label>
<input type="checkbox" id="broadcast"> Broadcast after signing
</label>
<button type="submit">Sign PSBT</button>
</form>
<div id="result" class="hidden"></div>
<div id="error" class="hidden"></div>
</div>
<script type="module" src="./index.js"></script>
</body>
</html>