mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-08 13:55:50 +00:00
35 lines
1.2 KiB
HTML
35 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<script src="ripple-0.16.5.js"></script>
|
|
<script>
|
|
console.log(ripple);
|
|
var api = new ripple.RippleAPI({server:'wss://s1.ripple.com/'});
|
|
api.connect().then(function() {
|
|
return api.getServerInfo();
|
|
}).then(function(server_info) {
|
|
document.body.innerHTML += "<p>Connected to rippled server!</p>" +
|
|
" <table>" +
|
|
" <tr><th>Version</th>" +
|
|
" <td>" + server_info.buildVersion + "</td></tr>" +
|
|
" <tr><th>Ledgers available</th>" +
|
|
" <td>" + server_info.completeLedgers + "</td></tr>" +
|
|
" <tr><th>hostID</th>" +
|
|
" <td>" + server_info.hostID + "</td></tr>" +
|
|
" <tr><th>Most Recent Validated Ledger Seq.</th>" +
|
|
" <td>" + server_info.validatedLedger.ledgerVersion + "</td></tr>" +
|
|
" <tr><th>Most Recent Validated Ledger Hash</th>" +
|
|
" <td>" + server_info.validatedLedger.hash + "</td></tr>" +
|
|
" <tr><th>Seconds since last ledger validated</th>" +
|
|
" <td>" + server_info.validatedLedger.age + "</td></tr>" +
|
|
" </table>";
|
|
});
|
|
</script>
|
|
<style type="text/css">
|
|
td, th { border: 1px solid black; padding: 5px; }
|
|
table { border-collapse: collapse; }
|
|
</style>
|
|
</head>
|
|
<body></body>
|
|
</html>
|