-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
40 lines (37 loc) · 1.13 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Proofx API Client</title>
<script src="../proofx.min.js" type="text/javascript"></script>
<script>
function getHash() {
var hash = document.getElementById('hash').value
console.log('hash: ', hash)
if (hash !== '' && hash.length == 64) {
proofx.getStatus(hash)
.then(function (response) {
console.log(response)
console.log(response.data)
document.getElementById('answer')
.innerHTML = JSON.stringify(response.data)
})
.catch(function (error) {
console.log(error);
});
}
}
</script>
</head>
<body>
<h1>Get status based on a hash</h1>
<p>Imput a sha256 hash -- ex. <em>15db6dbff590000ea13246e1c166802b690663c4e0635bfca78049d5a8762832</em></p>
<form onsubmit="event.preventDefault(); getHash();">
<input type="text" id="hash" placeholder="Input a hash here"/>
<input type="submit" value="Get Hash Info" />
</form>
<br />
<div id="answer">
</div>
</body>
</html>