This repository was archived by the owner on Dec 29, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestingindex.html
More file actions
79 lines (58 loc) · 2 KB
/
testingindex.html
File metadata and controls
79 lines (58 loc) · 2 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<h1 id="Testing"></h1>
<title>Testing</title>
<center>
<style>
#result_zone strong {
color: white;
background-color: black;
padding: 2px;
}
body {
border-style: double;
}
#credits {
color: white;
background-color: green;
margin: 5px;
}
#NodeData {
margin: 20px;
background-color: green;
}
</style>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="./dist/muse.min.js"></script>
</head>
<body>
</section>
</center>
<br/>
<br/>
<script>
// The username and activekey is requested, stored in the var username and displayed in the title
var username = null;
//muse activekey is requested and stored in var activekey this means it is only local cache and when this page is cache cleared the activekey is gone.
var activekey = null;
document.title = username + ' - ' + document.title;
//Set the websocket to be used for the script.
muse.config.set('websocket','wss://api.muse.blckchnd.com');
//Ping the node for the latest block, this help verify connectivity.
muse.api.streamBlockAsync(function(err, t) {
console.log(err, t.transactions);
});
muse.api.getAccountCount(function(err, t) {
console.log("Number of Accounts on Muse: " + err, t);
});
muse.api.getConfig(function(err, response){
console.log(err, response);
});
muse.api.getAccounts([username], function(err, response){
console.log(err, response);
});
</script>
</body>
</html>