forked from bcoin-org/bcoin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
110 lines (110 loc) · 2.78 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>bcoin</title>
<meta charset="utf-8">
<style>
html {
height: 100%;
}
body {
height: 90%;
padding: 20px;
}
h1 {
font: 3em monospace;
margin: 10px;
padding: 0;
}
small {
margin: 10px;
width: 50%;
display: block;
}
.log {
padding: 5px;
margin-left: 10px;
overflow-y: scroll;
border: 1px solid black;
white-space: pre-wrap;
height: 40%;
width: 40%;
font: 1em monospace;
margin-top: 10px;
}
.wallet {
padding: 5px;
margin-left: 5px;
margin-top: 10px;
font: 1em monospace;
}
.rpc, .send {
padding: 5px;
margin-left: 5px;
margin-top: 10px;
font: 1em monospace;
}
#newaddr{
display: block;
margin-left: 10px;
}
.tx {
float: right;
font: 1em monospace;
padding: 5px;
border: 1px solid black;
margin-top: 10px;
}
a {
text-decoration: none;
}
.floating {
font: 1em monospace;
white-space: pre-wrap;
position: absolute;
display: none;
padding: 5px;
background: white;
border: 1px solid black;
width: 40%;
height: 30%;
top: 50%;
left: 50%;
margin-left: -20%;
margin-top: -15%;
overflow-y: scroll;
}
</style>
<script src="app.js" defer></script>
</head>
<body>
<h1>Bcoin, the browser full node</h1>
<small>
Welcome. Your machine is currently validating the blockchain. The blocks
and wallet are stored on your local disk with indexed DB. You are
connecting to the actual bitcoin P2P network via a websocket->tcp
proxy. Enjoy. (See the
<a href="https://github.com/bcoin-org/bcoin"
target="_blank">bcoin repo</a>
for more bitcoin magic).
</small>
<div class="tx">
<div>Chain State: <span id="state"></span></div>
<div>Last 20 Blocks/TXs:</div>
<div id="tx"></div>
</div>
<div id="log" class="log"></div>
<form id="rpc" class="rpc" action="#">
<input type="text" name="cmd" id="cmd"
placeholder="RPC command (e.g. getblockchaininfo)">
</form>
<div id="wallet" class="wallet"></div>
<form id="send" class="send" action="#">
<input type="text" name="address" id="address" placeholder="Address">
<input type="text" name="amount" id="amount" placeholder="Amount (BTC)">
<input type="submit" value="Send">
</form>
<input type="button" id="newaddr" value="New Address">
<div id="floating" class="floating"></div>
</body>
</html>