forked from informalsystems/tendermint-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
106 lines (98 loc) · 3.06 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tendermint Light Client WASM Example</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css">
<style type="text/css">
.json-editor {
height: 300px;
}
#verdict-section {
visibility: hidden;
}
</style>
</head>
<body>
<section class="section">
<div class="container">
<h1 class="title is-2">Tendermint Light Client WASM Example</h1>
<p>
This example demonstrates how to make use of the
<a href="https://github.com/informalsystems/tendermint-rs/tree/main/light-client">Tendermint Light Client</a>
WASM build in a simple web application.
</p>
</div>
</section>
<section class="section">
<div class="container">
<div class="columns">
<div class="column">
<h4 class="title is-4">Untrusted Block</h4>
<div class="json-editor" id="untrusted-block-editor"></div>
</div>
<div class="column">
<h4 class="title is-4">Trusted Block</h4>
<div class="json-editor" id="trusted-block-editor"></div>
</div>
</div>
</div>
</section>
<section class="section">
<div class="container">
<h4 class="title is-4">Options</h4>
<div class="columns">
<div class="column">
<div class="field">
<label class="label">Trust threshold:</label>
<div class="control">
<input class="input" type="text" value="1/3" id="trust-threshold-input">
</div>
<p class="help">Must be in the format: <b>numerator/denominator</b></p>
</div>
</div>
<div class="column">
<div class="field">
<label class="label">Trusting period:</label>
<div class="control">
<input class="input" type="text" value="1209600" id="trusting-period-input">
</div>
<p class="help">A.k.a. "unbonding period", in seconds</p>
</div>
</div>
<div class="column">
<div class="field">
<label class="label">Clock drift:</label>
<div class="control">
<input class="input" type="text" value="5" id="clock-drift-input">
</div>
<p class="help">In seconds</p>
</div>
</div>
<div class="column">
<div class="field">
<label class="label">Now:</label>
<div class="control">
<input class="input" type="text" value="2020-10-21T12:40:04.160328400Z" id="now-input">
</div>
<p class="help">Timestamp in RFC3339 format for which you want to verify the block</p>
</div>
</div>
</div>
</div>
</section>
<section class="section">
<div class="container">
<button class="button is-large is-primary" id="verify-btn">Verify</button>
</div>
</section>
<section class="section" id="verdict-section">
<div class="container">
<h4 class="title is-4">Verdict</h4>
<pre id="verdict"></pre>
</div>
</section>
<script src="./bootstrap.js"></script>
</body>
</html>