Merge pull request #323 from mDuo13/doc1327

Add API tools and links
This commit is contained in:
Rome Reginelli
2018-03-27 13:39:36 -07:00
committed by GitHub
16 changed files with 1015 additions and 10 deletions

View File

@@ -95,7 +95,14 @@
.no-1st-head h4:first-child,
.no-1st-head h5:first-child,
.no-1st-head h6:first-child {
display: none;
visibility: hidden;
margin: 0;
padding: 0;
line-height: 0;
}
.no-1st-head h1:first-child:before {
margin-top: -167px;
height: 167px;
}
.content p {
line-height: 1.8;
@@ -246,6 +253,7 @@ pre code {
z-index: 5;
border-left: 1px solid #cccccc;
padding-left: 40px;
min-height: 700px;
}
.content {
padding-bottom: 50px;
@@ -522,6 +530,7 @@ th {
#sidenav_accordion .panel {
padding: 0;
border-radius: 0;
border-bottom: 1px solid #cccccc;
}
#sidenav_accordion .panel-heading h5 {
@@ -670,7 +679,7 @@ th {
}
/* Responsive design for different viewscreens -------------------------------*/
@media (min-width: 1200px) {
@media (min-width: 1201px) {
#page-toc-wrapper {
float: right;
margin-left: 15px;

View File

@@ -0,0 +1,16 @@
input#domain {
padding: 10px 20px;
width: 255px;
}
.result-title {
display: none;
}
span.red {
color: red;
}
span.green {
color: green;
}

View File

@@ -4556,7 +4556,7 @@ a.list-group-item-danger.active:focus {
background-color: #ffffff;
border: 1px solid transparent;
border-radius: 4px;
border-bottom: 1px solid #cccccc !important;
border-bottom: 1px solid #cccccc;
}
.panel-body {
padding: 15px;

119
assets/css/rpc-tool.css Normal file
View File

@@ -0,0 +1,119 @@
.input-xxlarge {
width: 100%;
padding: 5px;
}
.progress .bar {
width:0%;
height:100%;
color:#ffffff;
float:left;
font-size:12px;
text-align:center
;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);
background-color:#0e90d2;
background-image:-moz-linear-gradient(top, #149bdf, #0480be);
background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));
background-image:-webkit-linear-gradient(top, #149bdf, #0480be);
background-image:-o-linear-gradient(top, #149bdf, #0480be);
background-image:linear-gradient(to bottom, #149bdf, #0480be);
background-repeat:repeat-x;
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);
-webkit-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);
-moz-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);
box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;box-sizing:border-box;
-webkit-transition:width 0.6s ease;
-moz-transition:width 0.6s ease;
-o-transition:width 0.6s ease;
transition:width 0.6s ease;
}
#result {
display: none;
}
#log {
font-weight: 700;
}
.json .name {
color: #A513AC;
}
.json ul {
margin: 0;
display: none;
}
.json li {
padding: 0;
list-style-type: none;
}
.json .type-string .val {
color: #CC2A41;
}
.json .type-number .val {
color: #2973BA;
}
.json a.toggle:hover {
text-decoration: none;
}
.json > a.toggle {
display: none;
}
.json a.toggle:after {
content: " +\0000a0";
cursor: pointer;
}
.json > ul,
.json .expanded > ul {
display: block;
}
.json .ellipsis {
color: #ccc;
}
.json > .ellipsis,
.json .expanded > .ellipsis {
display: none;
}
.json .expanded > a.toggle:after {
content: " \2212\0000a0";
}
.json .indentafter {
display: none;
}
.json .expanded > .indentafter {
display: inline;
}
.tools {
background-color: #f5f5f5;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
font-size: 0.8em;
margin: 0 0 10px;
}
.tools>li>a {
cursor: pointer;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
padding: 6px 9px;
}

93
assets/css/test-net.css Normal file
View File

@@ -0,0 +1,93 @@
.cta_readmore {
background-color: #27a2db;
color: white;
border-radius: 5px;
padding: 10px 50px;
border: none;
outline: 0;
}
.cta_readmore:hover,
.cta_readmore:active,
.cta_readmore:focus {
background-color: #43bded;
color: white;
outline: 0;
border: none;
}
#your-credentials {
display: none;
margin: 15px 0 30px;
}
#loader {
display: none;
}
#loader img {
margin: 0 10px 0 20px;
width: 25px;
height: auto;
}
#test-net-servers {
font-size: 15px;
border-radius: 5px;
border: 1px solid #27a2db;
width: 350px;
float: right;
margin-left: 15px;
}
#test-net-servers pre {
overflow-x: auto;
}
.page-test-net .container {
margin-left: 15px;
margin-right: 15px;
width: auto;
}
@media (min-width: 1600px) {
.page-test-net .container {
margin-left: auto;
margin-right: auto;
width: 1500px;
}
}
@media (max-width: 992px) {
#test-net-servers {
position: static;
float: none;
max-width: none;
width: auto;
margin: 0 0 30px 0;
}
}
h2 {
font-size: 36px;
color: #066b98;
line-height: 1.2em;
margin-top: 0;
}
#test-net-servers h5 {
letter-spacing: .04em;
font-family: 'open_sansbold', sans-serif;
text-transform: uppercase;
color: #344e5a;
clear: both;
margin-top: 20px !important;
}
#test-net-servers .panel-heading {
margin-top: 0;
padding: 0;
font-size: 21px;
font-family: "open_sanslight", sans-serif;
color: #27a2db;
line-height: 1.2em;
margin-bottom: 20px;
}

View File

@@ -0,0 +1,117 @@
function VerificationError(message, tips) {
this.name = "VerificationError";
this.message = message || "";
this.tips = tips || "";
}
VerificationError.prototype = Error.prototype;
function makeLogEntry(text) {
var log = $('<li></li>').text(text).appendTo('#log');
log.resolve = function(text) {
return $('<span></span>').html(text).appendTo(log);
};
return log;
}
$('#domain-entry').submit(function(e) {
e.preventDefault();
var domain = $('#domain').val(),
txtdata;
$('.result-title').show();
$('#result').show();
$('#log').empty();
async.waterfall([
function(callback) {
var urls = [
//'http://www.'+domain+'/ripple.txt',
'https://www.' + domain + '/ripple.txt',
//'http://'+domain+'/ripple.txt',
'https://' + domain + '/ripple.txt',
'https://ripple.' + domain + '/ripple.txt'
].reverse();
function next(xhr, status) {
if (this instanceof $) {
var err;
switch (status) {
case 'timeout':
err = 'TIMEOUT';
break;
case 'abort':
err = 'ABORTED';
break;
case 'error':
err = 'ERROR';
break;
default:
err = 'UNKNOWN';
}
$('<span></span>').text(err).addClass('red').appendTo(this);
}
if (!urls.length) {
var tips = 'Check if the file is actually hosted at one of the URLs above and make sure your server provides the required <a href="https://ripple.com/wiki/Ripple.txt#Publishing_ripple.txt">CORS header.</a>';
callback(new VerificationError('No ripple.txt found!', tips));
return;
}
var url = urls.pop();
var log = makeLogEntry('Checking ' + url + '...');
$.ajax({
url: url,
dataType: 'text',
success: function(data) {
$('<span></span>').text('FOUND').addClass('green').appendTo(log);
txtdata = data;
callback();
},
error: $.proxy(next, log)
});
}
next();
},
function() {
txtdata = txtdata.replace('\r\n', '\n');
txtdata = txtdata.replace('\r', '\n');
txtdata = txtdata.split('\n');
var currentSection = "",
sections = {};
for (var i = 0, l = txtdata.length; i < l; i++) {
var line = txtdata[i].replace(/^\s+|\s+$/g, '');
if (!line.length || line[0] === '#') {
continue;
} else if (line[0] === '[' && line[line.length - 1] === ']') {
currentSection = line.slice(1, line.length - 1);
sections[currentSection] = [];
} else {
line = line.replace(/^\s+|\s+$/g, '');
if (sections[currentSection]) {
sections[currentSection].push(line);
}
}
}
var log;
log = makeLogEntry('Domain should match [domain]...');
if (sections.domain && sections.domain.length && sections.domain[0] === domain) {
log.resolve('VALID').addClass('green');
} else if (sections.domain && sections.domain.length) {
log.resolve('MISMATCH').addClass('red');
} else {
log.resolve('MISSING').addClass('red');
}
}
], function(err, result) {
if (err instanceof VerificationError) {
var log = makeLogEntry("");
log.resolve(err.message).addClass('red');
$('<br>').appendTo(log);
$('<p></p>').html(err.tips).appendTo(log);
} else if (err) {
makeLogEntry(err).addClass('red');
}
});
});

369
assets/js/rpc-tool.js Normal file
View File

@@ -0,0 +1,369 @@
jQuery(function ($) {
var reTxId = /^[0-9A-Fa-f]{64}$/,
reLedgerSeq = /^[0-9]+$/;
var txOffset = 0,
txCount = 0,
currentTarget = null;
var remote = ripple.Remote.from_config({
"trace" : true,
"websocket_ip" : "s2.ripple.com",
"websocket_port" : 443,
"websocket_ssl" : true
});
remote.connect();
remote.once('connected', function () {
var target = location.hash.slice(1);
if (ripple.UInt160.from_json(target).is_valid() ||
reTxId.exec(target) ||
reLedgerSeq.exec(target)) {
$('#target').val(target);
fetchTarget(target);
}
});
$('#account-entry').submit(function (e) {
e.preventDefault();
var target = $('#target').val();
fetchTarget(target);
});
function fetchTarget(target)
{
if (!remote.state === "online") return;
// Reset
$("#links").show();
$("#result").show();
$("#result > .group").hide();
$("#error").hide();
$("#progress").show();
$(".json").html("");
$("#datalink").parent().removeClass("disabled");
$(".account-tx-more").parent().hide();
$(".account-tx-back").parent().hide();
txOffset = 0;
currentTarget = target;
var locationWithoutHash = location.protocol+'//'+location.hostname+(location.port?":"+location.port:"")+location.pathname+(location.search?location.search:"");
$("#permalink").attr("href", locationWithoutHash + "#" + target);
$("#graphlink").attr("href", "https://www.ripplecharts.com/#/graph/" + target);
if (ripple.UInt160.from_json(target).is_valid()) {
// Account
var account = target;
$("#result > .group-account").show();
$("#progress .bar").css("width", "10%");
$("#datalink").attr("href", null).parent().addClass("disabled");
async.waterfall([
function (callback) {
remote.request_account_info({account:account})
.on('success', function (result) {
$("#progress .bar").css("width", "20%");
console.log('account_info', result);
format(result, $("#account_info"));
callback();
})
.on('error', callback)
.request();
},
function (callback) {
remote.request_account_lines({account:account})
.on('success', function (result) {
$("#progress .bar").css("width", "40%");
console.log('account_lines', result);
format(result, $("#account_lines"));
callback();
})
.on('error', callback)
.request();
},
function (callback) {
requestTx(account, function (err) {
if (err) return callback(err);
$("#progress .bar").css("width", "60%");
callback();
});
},
function (callback) {
remote.request_account_offers({account:account})
.on('success', function (result) {
$("#progress .bar").css("width", "80%");
console.log('account_offers', result);
format(result, $("#account_offers"));
callback();
})
.on('error', callback)
.request();
}
], function (err) {
if (err) handleError(err);
$("#progress .bar").css("width", "100%");
$("#progress").fadeOut();
});
} else if (reLedgerSeq.exec(target)) {
$("#result > .group-ledger").show();
// Ledger
$("#progress .bar").css("width", "10%");
remote.request_ledger(undefined, { transactions: true, expand: true })
.ledger_index(+target)
.on('success', function (result) {
$("#progress .bar").css("width", "100%");
$("#progress").fadeOut();
console.log('ledger', result.ledger);
format(result.ledger, $("#ledger_info"));
})
.on('error', function (err) {
console.log(err);
handleError(err);
$("#progress .bar").css("width", "100%");
$("#progress").fadeOut();
})
.request();
} else if (reTxId.exec(target)) {
$("#result > .group-tx").show();
$("#datalink").attr("href", "https://ripple.com/client/#/tx/?id=" + target);
// Transaction
$("#progress .bar").css("width", "10%");
remote.requestTransaction({"hash": target, "binary": false})
.on('success', function (result) {
$("#progress .bar").css("width", "100%");
$("#progress").fadeOut();
console.log('tx', result);
format(result, $("#tx_info"));
})
.on('error', function (err) {
handleError(err);
$("#progress .bar").css("width", "100%");
$("#progress").fadeOut();
})
.request();
} else {
// Unknown/Invalid
$("#links").hide();
$("#progress").hide();
handleError("Input is not a valid address or transaction hash");
}
}
$('.tx-expand').click(function () {
$("#tx_info .expanded").removeClass("expanded");
$("#tx_info").find("ul > li").addClass("expanded");
});
$('.tx-collapse').click(function () {
$("#tx_info .expanded").removeClass("expanded");
});
$('.account-lines-expand').click(function () {
$("#account_lines .expanded").removeClass("expanded");
$("#account_lines").find("ul > li").addClass("expanded");
});
$('.account-lines-collapse').click(function () {
$("#account_lines .expanded").removeClass("expanded");
});
$('.account-tx-expand-tx').click(function () {
$("#account_tx .expanded").removeClass("expanded");
$("#account_tx").find("> ul > li").addClass("expanded").find("> ul > li").addClass("expanded").find("> ul > li span.name:contains(tx)").parent().addClass("expanded");
});
$('.account-tx-expand').click(function () {
$("#account_tx .expanded").removeClass("expanded");
$("#account_tx").find("ul > li").addClass("expanded");
});
$('.account-tx-collapse').click(function () {
$("#account_tx .expanded").removeClass("expanded");
});
$('.account-tx-more').click(function () {
$(".account-tx-back").parent().show();
txOffset += 20;
$("#account_tx").text("... loading ...");
requestTx(currentTarget, function (err) {});
updateTxOffsetNav();
});
$('.account-tx-back').click(function () {
txOffset -= 20;
$("#account_tx").text("... loading ...");
requestTx(currentTarget, function (err) {});
updateTxOffsetNav();
});
$('.account-offers-expand').click(function () {
$("#account_offers .expanded").removeClass("expanded");
$("#account_offers").find("ul > li").addClass("expanded");
});
$('.account-offers-collapse').click(function () {
$("#account_offers .expanded").removeClass("expanded");
});
$('.ledger-expand-tx').click(function () {
$("#ledger_info .expanded").removeClass("expanded");
$("#ledger_info").find("> ul > li").addClass("expanded").find("> ul > li").addClass("expanded").find("> ul > li span.name:contains(tx)").parent().addClass("expanded");
});
$('.ledger-expand').click(function () {
$("#ledger_info .expanded").removeClass("expanded");
$("#ledger_info").find("ul > li").addClass("expanded");
});
$('.ledger-collapse').click(function () {
$("#ledger_info .expanded").removeClass("expanded");
});
$('pre.json').delegate(".toggle", "click", function (evt) {
console.log(this);
$(this).parent().toggleClass("expanded");
});
function handleError(err) {
console.error(err);
if ("string" === typeof err) {
$("#error").show().text(err);
} else if ("object" === typeof err) {
if (err.error === "remoteError" &&
"object" === typeof err.remote)
{
err = err.remote;
}
if (err.error_message) {
$("#error").show().text(err.error_message);
} else if (err.error) {
$("#error").show().text(err.error);
} else {
$("#error").show().text(err.toString());
}
}
}
function requestTx(account, callback) {
remote.request_account_tx({
'account': account,
'ledger_index_min': -1,
'descending': true,
'limit': 20,
'offset' : txOffset,
'count': true,
'binary': false
})
.on('success', function (result) {
txCount = result.count;
console.log('account_tx', result);
format(result, $("#account_tx").empty());
callback();
updateTxOffsetNav();
})
.on('error', callback)
.request();
}
function updateTxOffsetNav()
{
$(".account-tx-back").parent().hide();
$(".account-tx-more").parent().hide();
if (txOffset > 0)
$(".account-tx-back").parent().show();
if (txCount > (txOffset + 20))
$(".account-tx-more").parent().show();
}
String.prototype.repeat = function(times) {
return (new Array(times + 1)).join(this);
};
function format(v, ct, depth) {
depth = depth || 0;
switch (typeof v) {
case "object":
var el, sub = null, count;
if (Array.isArray(v)) {
ct.append("[");
count = v.length;
for (var i = 0; i < count; i++) {
if (!sub) {
$('<a class="toggle"></a>').appendTo(ct);
$('<span class="ellipsis"></span>')
.text(getEllipText(count)).appendTo(ct);
el = $("<ul></ul>");
} else sub.append(",");
sub = $("<li></li>").addClass("type-" + typeof v[i]);
sub.append("\u00A0".repeat(2 + depth*2));
format(v[i], sub, depth + 1);
sub.appendTo(el);
}
if (el) {
el.appendTo(ct);
$('<span class="indentafter"></span>').text("\u00A0".repeat(depth*2)).appendTo(ct);
}
ct.append("]");
} else {
ct.append("{");
count = Object.keys(v).length;
for (var i in v) {
if (!sub) {
$('<a class="toggle"></a>').appendTo(ct);
$('<span class="ellipsis"></span>')
.text(getEllipText(Object.keys(v))).appendTo(ct);
el = $("<ul></ul>");
} else sub.append(",");
sub = $("<li></li>").addClass("type-" + typeof v[i]);
sub.append("\u00A0".repeat(2 + depth*2));
$("<span></span>").addClass('name').text(i).appendTo(sub);
$("<span></span>").addClass('sep').text(" : ").appendTo(sub);
format(v[i], sub, depth + 1);
sub.appendTo(el);
}
if (el) {
el.appendTo(ct);
$('<span class="indentafter"></span>').text("\u00A0".repeat(depth*2)).appendTo(ct);
}
ct.append("}");
}
break;
case "string":
$("<span></span>").addClass('val').text('"'+v+'"').appendTo(ct);
break;
case "number":
$("<span></span>").addClass('val').text(""+v).appendTo(ct);
break;
case "boolean":
$("<span></span>").addClass('val').text(v ? "true" : "false").appendTo(ct);
break;
}
}
function getEllipText(count) {
var label = "...";
if (Array.isArray(count)) {
label = "";
while (label.length < 15) {
if (!count.length) break;
if (label.length) label += ", ";
label += count.shift();
}
if (count.length) label += ", ...";
} else if ("number" === typeof count) {
label = "" + count + " items";
}
return "\u00A0/* "+label+" */\u00A0";
}
});

39
assets/js/test-net.js Normal file
View File

@@ -0,0 +1,39 @@
function rippleTestNetCredentials() {
var credentials = $('#your-credentials');
var address = $('#address');
var secret = $('#secret');
var balance = $('#balance');
var loader = $('#loader');
//reset the fields initially and for re-generation
credentials.hide();
address.html('');
secret.html('');
balance.html('');
loader.css('display', 'inline');
//call the alt-net and get key generations
$.ajax({
url: "https://faucet.altnet.rippletest.net/accounts",
type: 'POST',
dataType: 'json',
success: function(data) {
//hide the loader and show results
loader.hide();
credentials.hide().html('<h2>Your Credentials</h2>').fadeIn('fast');
address.hide().html('<h3>Address</h3> ' + data.account.address).fadeIn('fast');
secret.hide().html('<h3>Secret</h3> ' + data.account.secret).fadeIn('fast');
balance.hide().html('<h3>Balance</h3> ' + Number(data.balance).toLocaleString('en') + ' XRP').fadeIn('fast');
},
error: function() {
loader.hide();
alert("There was an error with the Ripple Test Net, please try again.");
}
});
}
$(document).ready(function() {
$('.cta_readmore').click(rippleTestNetCredentials);
});

1
assets/vendor/async.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -33,7 +33,6 @@ callout_class: "devportal-callout"
cover_page:
name: Overview
html: index.html
sidebar: "off"
template: template-index.html
targets:
@@ -434,13 +433,19 @@ pages:
- ripple.com
# Appendix: API Tools --------------------------------------------------------
- name: RPC Tool
category: API Tools
html: xrp-ledger-rpc-tool.html
targets:
- local
template: template-xrp-ledger-rpc-tool.html
- name: WebSocket API Tool
category: API Tools
html: ripple-api-tool.html
sidebar: custom
targets:
- local
- ripple.com
template: template-ripple-api-tool.html
- name: Data API v2 Tool
@@ -452,9 +457,22 @@ pages:
sidebar: custom
targets:
- local
- ripple.com
template: template-rest-api-tool.html
- name: ripple.txt Validator
category: API Tools
html: ripple-txt-validator.html
targets:
- local
template: template-ripple-txt-validator.html
- name: XRP Test Net Faucet
category: API Tools
html: xrp-test-net-faucet.html
targets:
- local
template: template-test-net.html
# Non-canonical pages
- name: Page Manifest
# Used to inform the ripple.com code what pages it should map

View File

@@ -36,7 +36,7 @@
</head>
<body class="{% block bodyclasses %} xrp-ledger-dev-portal sidebar-primary{% endblock %}">
<body class="xrp-ledger-dev-portal {% block bodyclasses %}sidebar-primary{% endblock %}">
<header role="banner" class="banner navbar navbar-default navbar-fixed-top initial_header">
<div class="container">
<div class="navbar-header">
@@ -77,7 +77,7 @@
{% if not have_edit_link %}
{% set githuburl = target.github_forkurl %}
{% endif %}
<a href="{{githuburl}}" class="github-edit">Edit on GitHub</a>
<a href="{{githuburl}}" target="_blank" class="github-edit">Edit on GitHub</a>
</div><!-- /.github-edit -->
</div><!-- /.nav -->

View File

@@ -29,6 +29,12 @@
{% endfor %}
</ul>
{% endfor %}
<ul>
<li class="top"><h5><span class="dev_heading">Ripple Resources</span></h5></li>
<li><a href="https://ripple.com/category/dev-blog/">Dev Blog</a></li>
<li><a href="https://github.com/ripple/">Source Code on GitHub</a></li>
<li><a href="https://ripple.com/">Corporate Website</a></li>
</ul>
</div>
</div>
</div>
@@ -36,7 +42,7 @@
<aside class="related-projects">
<h3>Related Projects</h3>
<div class="project">
<p><a class="client-portal-link" href="https://clients.ripple.com/">
<p><a class="client-portal-link" href="https://clients.ripple.com/" target="_blank">
<img class="project-icon" src="assets/img/RippleNet-condensed.svg" />
<span class="project-name">Ripple Client Portal</span>
<span class="login-required">(login required)</span>
@@ -44,7 +50,7 @@
<p class="project-summary">For financial institutions using Ripple's proprietary solutions to send money globally.</p>
</div>
<div class="project">
<p><a class="interledger-link" href="https://interledger.org/">
<p><a class="interledger-link" href="https://interledger.org/" target="_blank">
<img class="project-icon" src="assets/img/ilp_logo.svg" />
<span class="project-name">Interledger</span>
</a></p>

View File

@@ -0,0 +1,39 @@
{% extends "template-base.html" %}
{% block main %}
<div id="container" class="lit">
<h1>ripple.txt Validator</h1>
<p>If you run a business that connects to the XRP Ledger, serving a <code>ripple.txt</code> file from your domain can help clarify which XRP Ledger addresses you own and use, and which validating server(s) you run.</p>
<p>This tool allows you to verify that your ripple.txt is syntactically
correct and deployed properly.</p><br/>
<form id="domain-entry">
<fieldset>
<input id="domain" type="text" required
placeholder="Domain name, e.g.example.com"
pattern="^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$"><br>
<button class="cta_readmore btn">Verify ripple.txt</button>
</fieldset>
</form>
<div id="result">
<h5 class='result-title'>Result</h5>
<ul id="log">
</ul>
</div>
</div>
{% endblock %}
{% block sidebar %}
{% if currentpage.sidebar != "disabled" %}
{% include "template-sidebar_nav.html" %}
{% endif %}
{% endblock %}
{% block endbody %}
<link rel='stylesheet' type='text/css' href='assets/css/ripple-txt-validator.css' />
<script type='text/javascript' src='assets/vendor/async.min.js'></script>
<script type='text/javascript' src='assets/js/ripple-txt-validator.js'></script>
{% endblock %}

View File

@@ -29,5 +29,27 @@
</div><!-- /.panel -->
{% endfor %}
{# special Ripple Resources section #}
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="sidenav_cat_head_ripple_resources">
<h5 class="panel-title">
<a class="collapsed" role="button" data-toggle="collapse" data-parent="#sidenav_accordion" href="#sidenav_collapse_ripple_resources" aria-expanded="true" aria-controls="sidenav_collapse_ripple_resources">
Ripple Resources
</a>
</h5>
</div><!-- /.panel-heading -->
<div id="sidenav_collapse_ripple_resources" class="collapse" role="tabpanel" aria-labelledby="sidenav_cat_head_ripple_resources">
<div class="panel-body">
<ul class="sidebar_cat_pagelist">
<li><a href="https://ripple.com/category/dev-blog/">Dev Blog</a></li>
<li><a href="https://github.com/ripple/">Open Source on GitHub</a></li>
<li><a href="https://ripple.com/">Corporate Website</a></li>
</ul>
</div><!-- /.panel-body -->
</div><!-- /#sidenav_collapseripple_resources -->
</div><!-- /.panel -->
</div><!-- /#sidenav_accordion -->
</div><!-- /.guide_toc -->

View File

@@ -0,0 +1,44 @@
{% extends "template-base.html" %}
{% block bodyclasses %}sidebar-primary page-test-net{% endblock %}
{% block main %}
<h1>XRP Test Net Faucet</h1>
<aside id="test-net-servers" class="panel panel-default">
<div class="panel-body">
<p class="in-this-doc panel-heading">Test Net Servers</p>
<p>Use the following addresses to connect to the XRP Test Net and send transactions from your account.</p>
<h5>Websockets and Ripple API</h4>
<pre><code>wss://s.altnet.rippletest.net:51233</code></pre>
<h5>JSON-RPC</h4>
<pre><code>https://s.altnet.rippletest.net:51234</code></pre>
</div>
</aside>
<div class="content">
<p>Ripple has created this alternative XRP Ledger test network with nodes in every region of the world to provide a testing platform for any software products built on the XRP Ledger without using real funds.</p>
<p>Test Net funds are intended for <strong>testing</strong> only. The Test Net ledger and balances will be reset on a regular basis.</p>
<button class="cta_readmore btn">Generate credentials</button>
<div id='your-credentials'></div>
<div id='loader' style="display: none;"><img class='throbber' src="assets/img/rippleThrobber.png"> Generating Keys...</div>
<div id='address'></div>
<div id='secret'></div>
<div id='balance'></div>
</div>
{% endblock %}
{% block sidebar %}
{% if currentpage.sidebar != "disabled" %}
{% include "template-sidebar_nav.html" %}
{% endif %}
{% endblock %}
{% block endbody %}
<link rel='stylesheet' type='text/css' href='assets/css/test-net.css'/>
<script type='text/javascript' src='assets/js/test-net.js'></script>
{% endblock %}

View File

@@ -0,0 +1,113 @@
{% extends "template-base.html" %}
{% block bodyclasses %}rpc-tool sidebar-primary{% endblock %}
{% block sidebar %}
{% include "template-sidebar_nav.html" %}
{% endblock %}
{% block main %}
<h1>RPC Tool</h1>
<div class="content">
<p>This is a debug tool for printing raw information about an account, a transaction (by hash) or a ledger (by sequence number).</p>
<form id="account-entry">
<fieldset><input id="target" class="input-xxlarge" required="" type="text" placeholder="Ripple address or transaction ID" />
<span class="help-block"><small>Try an account like <em>r9kiSEUEw6iSCNksDVKf9k3AyxjW3r1qPf</em>.</small></span>
<button class="btn btn-primary">Get info</button></fieldset>
</form>
<div id="result">
<h2>Result</h2>
<div id="progress" class="progress">
<div class="bar"></div>
</div>
<div id="error" class="alert alert-error"></div>
<ul id="links" class="nav nav-pills">
<li><a id="permalink" href="#" target="_blank" rel="noopener">Permalink</a></li>
<li><a id="graphlink" href="#" target="_blank" rel="noopener">Graph</a></li>
</ul>
<div class="alert alert-info"><strong>Tip:</strong> This page features intelligent copy/paste. Any
nodes you expand will be copied, any that you don't expand will show up
as a little <code>/* */</code> comment in your copy/pasted text.</div>
<div class="group group-tx">
<h3>tx</h3>
<ul class="tools nav nav-pills">
<li><a class="tx-expand">expand all</a></li>
<li><a class="tx-collapse">collapse all</a></li>
</ul>
<pre id="tx_info" class="json"></pre>
<ul class="tools nav nav-pills">
<li><a class="tx-expand">expand all</a></li>
<li><a class="tx-collapse">collapse all</a></li>
</ul>
</div>
<div class="group group-account">
<h3>account_info</h3>
<pre id="account_info" class="json"></pre>
<h3>account_lines</h3>
<ul class="tools nav nav-pills">
<li><a class="account-lines-expand">expand all</a></li>
<li><a class="account-lines-collapse">collapse all</a></li>
</ul>
<pre id="account_lines" class="json"></pre>
<ul class="tools nav nav-pills">
<li><a class="account-lines-expand">expand all</a></li>
<li><a class="account-lines-collapse">collapse all</a></li>
</ul>
<h3>account_tx (last 20)</h3>
<ul class="tools nav nav-pills">
<li><a class="account-tx-expand-tx">expand tx</a></li>
<li><a class="account-tx-expand">expand all</a></li>
<li><a class="account-tx-collapse">collapse all</a></li>
<li><a class="account-tx-more">next 20</a></li>
<li><a class="account-tx-back">prev 20</a></li>
</ul>
<pre id="account_tx" class="json"></pre>
<ul class="tools nav nav-pills">
<li><a class="account-tx-expand-tx">expand tx</a></li>
<li><a class="account-tx-expand">expand all</a></li>
<li><a class="account-tx-collapse">collapse all</a></li>
<li><a class="account-tx-more">next 20</a></li>
<li><a class="account-tx-back">prev 20</a></li>
</ul>
<h3>account_offers</h3>
<ul class="tools nav nav-pills">
<li><a class="account-offers-expand">expand all</a></li>
<li><a class="account-offers-collapse">collapse all</a></li>
</ul>
<pre id="account_offers" class="json"></pre>
<ul class="tools nav nav-pills">
<li><a class="account-offers-expand">expand all</a></li>
<li><a class="account-offers-collapse">collapse all</a></li>
</ul>
</div>
<div class="group group-ledger">
<h3>ledger</h3>
<ul class="tools nav nav-pills">
<li><a class="ledger-expand-tx">expand tx</a></li>
<li><a class="ledger-tx-expand">expand all</a></li>
<li><a class="ledger-tx-collapse">collapse all</a></li>
</ul>
<pre id="ledger_info" class="json"></pre>
<ul class="tools nav nav-pills">
<li><a class="ledger-tx-expand-tx">expand tx</a></li>
<li><a class="ledger-tx-expand">expand all</a></li>
<li><a class="ledger-tx-collapse">collapse all</a></li>
</ul>
</div>
</div>
</div>
{% endblock %}
{% block endbody %}
<link rel='stylesheet' type='text/css' href='assets/css/rpc-tool.css'/>
<script type='text/javascript' src='assets/js/es5-shim.js'></script>
<script type='text/javascript' src='assets/js/ripple-0.11.0-min.js'></script>
<script type='text/javascript' src='assets/vendor/async.min.js'></script>
<script type='text/javascript' src='assets/vendor/cm-javascript.min.js'></script>
<script type='text/javascript' src='assets/js/rpc-tool.js'></script>
{% endblock %}