Permalink
Browse files

- Added support for parallel blockchain downloads

- Threaded POC-signature verification

 Please enter the commit message for your changes. Lines starting
  • Loading branch information...
0 parents commit d2572eaa839c2dd52bdb91588971ceca3b92bfed @dcct dcct committed Mar 2, 2016
Showing 514 changed files with 178,870 additions and 0 deletions.
@@ -0,0 +1,2 @@
+[InternetShortcut]
+URL=http://localhost:8125/
@@ -0,0 +1,20 @@
+Copyright (c) 2013-2014 The Nxt core developers.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
@@ -0,0 +1,2 @@
+burstcoin
+=========
@@ -0,0 +1,14 @@
+Burst ver 1.0.0
+
+Requirements:
+Java 7 compatible JVM
+
+Setup:
+Before you do anything, sync your clock. Burst uses your computer clock's time, and having the time off too much could cause you to reject legit blocks, or miss out on blocks you could have mined. On linux "sudo ntpd -gq", on windows go to change date/time, and go to internet time and tell it to sync with a time server.
+
+Please open conf/nxt-default.properties in a text editor, and add your ip:8123 to the line nxt.myAddress=, so it looks like "nxt.myAddress=111.111.111.111:8123", and forward 8123 if behind a NAT. This is not required, but will help the network by reducing the load on other nodes.
+
+Usage:
+Run run.sh or run.bat to start the server. The interface is accessed through a web browser on port 8125. ex: http://127.0.0.1:8125 or http://localhost:8125
+
+Pick a long passphrase, as it is the only thing needed to access your account.
@@ -0,0 +1 @@
+*.db
@@ -0,0 +1,12 @@
+CP=conf/:classes/:lib/*
+SP=src/java/
+
+/bin/mkdir -p classes/
+
+javac -sourcepath $SP -classpath $CP -d classes/ src/java/nxt/*.java src/java/nxt/*/*.java src/java/fr/cryptohash/*.java || exit 1
+
+/bin/rm -f burst.jar
+jar cf burst.jar -C classes . || exit 1
+/bin/rm -rf classes
+
+echo "burst.jar generated successfully"
@@ -0,0 +1 @@
+*.properties
@@ -0,0 +1,30 @@
+This project: MIT
+
+Theme - MIT - https://github.com/almasaeed2010/AdminLTE
+jquery.js - MIT - http://jquery.com/
+bootstrap.js / bootstrap.css - APACHE2 - http://getbootstrap.com
+font-awesome.css - MIT - http://fortawesome.github.io
+growl - MIT - https://github.com/mouse0270/bootstrap-growl
+ionicons.css - MIT - http://ionicons.com
+jquery.rss.js - MIT - https://github.com/sdepold/jquery-rss
+webdb.js - MIT - http://github.com/haas85/webdb
+passphrasegenerator.js - custom - based on https://github.com/michenriksen/diceware (UNLICENSE) and https://github.com/ggozad/mnemonic.js (MIT)
+seedrandom.js - MIT - https://github.com/davidbau/seedrandom
+ZeroClipboard.js/.swf - MIT - http://zeroclipboard.org/
+signing/converters.js - MIT - https://github.com/Jaguar0625/JavaScriptNrs + https://github.com/jscud/jsBytes/
+signing/crypto.js - MIT - https://github.com/Jaguar0625/JavaScriptNrs
+signing/curve25519.js - MIT - https://github.com/Jaguar0625/JavaScriptNrs
+jsbn.js / jsbn2.js - BSD - http://www-cs-students.stanford.edu/~tjw/jsbn/
+jssha256.js - GPL - http://point-at-infinity.org/jssha256/
+nxt_address.js - public domain
+xoreddata.js - MIT - BloodyRookie
+big.js - MIT - https://github.com/MikeMcl/big.js
+ajaxretry.js - MIT - https://github.com/dcherman/jQuery.ajaxRetry
+ajaxmultiqueue.js - MIT - https://github.com/GeReV/jQuery.ajaxMultiQueue
+autolink.js - MIT - https://github.com/bryanwoods/autolink-js
+addclear.js - https://github.com/skorecky/Add-Clear
+cryptojs - BSD - https://code.google.com/p/crypto-js/
+pako.js - MIT - https://github.com/nodeca/pako
+maskedinput.js - MIT - https://github.com/digitalBush/jquery.maskedinput
+i18next.js - MIT - https://github.com/jamuhl/i18next
+qrcode.js - MIT - https://github.com/jeromeetienne/jquery-qrcode/
@@ -0,0 +1,284 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="UTF-8"/>
+ <title>NRS</title>
+ <style type="text/css">
+ table {border-collapse: collapse;}
+ td {padding: 10px;}
+ .result {white-space: pre; font-family: monospace;}
+ </style>
+ <script type="text/javascript">
+ function submitForm(form) {
+ var url = '/nxt';
+ var params = '';
+ for (i = 0; i < form.elements.length; i++) {
+ if (! form.elements[i].name) {
+ continue;
+ }
+ if (i > 0) {
+ params += '&';
+ }
+ params += encodeURIComponent(form.elements[i].name);
+ params += '=';
+ params += encodeURIComponent(form.elements[i].value);
+ }
+ var request = new XMLHttpRequest();
+ request.open("POST", url, false);
+ request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
+ request.send(params);
+ var result = JSON.stringify(JSON.parse(request.responseText), null, 4);
+ form.getElementsByClassName("result")[0].textContent = result;
+ return false;
+ }
+ function getAccountBalances(form) {
+ var accounts = form.elements["accounts"].value.split('\n');
+ var balance = 0;
+ var result = '<table><tr><th>account</th><th>balance</th></tr>';
+ for (i = 0; i < accounts.length; i++) {
+ account = accounts[i].trim();
+ if (account != '') {
+ var accountBalance = getBalance(accounts[i]);
+ result += '<tr><td>';
+ result += account;
+ result += ':</td><td>';
+ result += formatAmount(accountBalance);
+ result += '</td></tr>';
+ balance += accountBalance;
+ }
+ }
+ result += '<tr><td>total:</td><td>';
+ result += formatAmount(balance);
+ result += '</td></tr></table>';
+ form.getElementsByClassName("result")[0].innerHTML = result;
+ return false;
+ }
+ function getBalance(account) {
+ var request = new XMLHttpRequest();
+ request.open("GET", '/nxt?requestType=getBalance&account=' + account, false);
+ request.send();
+ return parseInt(JSON.parse(request.responseText).balanceNQT);
+ }
+ function formatAmount(amount) {
+ var digits=[], formattedAmount = "", i;
+ var wholePart = Math.floor(amount / 100000000);
+ var fractionalPart = amount % 100000000;
+ do {
+ digits[digits.length] = wholePart % 10;
+ wholePart = Math.floor(wholePart / 10);
+ } while (wholePart > 0);
+ for (i = 0; i < digits.length; i++) {
+ if (i > 0 && i % 3 == 0) {
+ formattedAmount = "'" + formattedAmount;
+ }
+ formattedAmount = digits[i] + formattedAmount;
+ }
+ if (fractionalPart != 0) {
+ formattedAmount += ".";
+ for (i = fractionalPart.length; i < 8; i++) {
+ formattedAmount += "0";
+ }
+ formattedAmount += fractionalPart;
+ }
+ return formattedAmount;
+ }
+ </script>
+</head>
+<body>
+<h3>Nxt admin tools</h3>
+<b>Generate Hallmark:</b><br/>
+<form action="/nxt" method="POST" onsubmit="return submitForm(this);">
+ <input type="hidden" name="requestType" value="markHost"/>
+ <table>
+ <tr>
+ <td>Public IP:</td>
+ <td><input type="text" name="host"/></td>
+ </tr>
+ <tr>
+ <td>Weight:</td>
+ <td><input type="number" name="weight" value="100"/></td>
+ </tr>
+ <tr>
+ <td>Date:</td>
+ <td><input type="text" name="date" value="2013-12-10"/></td>
+ </tr>
+ <tr>
+ <td>Secret Phrase:</td>
+ <td><input type="password" name="secretPhrase"/></td>
+ </tr>
+ <tr>
+ <td colspan="2"><input type="submit" value="submit"/></td>
+ </tr>
+ </table>
+ <div class="result"></div>
+</form>
+<hr>
+<b>Verify Hallmark:</b><br/>
+<form action="/nxt" method="POST" onsubmit="return submitForm(this);">
+ <input type="hidden" name="requestType" value="decodeHallmark"/>
+ <table>
+ <tr>
+ <td>Hallmark:</td>
+ <td><input type="text" name="hallmark"/></td>
+ </tr>
+ <tr>
+ <td colspan="2"><input type="submit" value="submit"/></td>
+ </tr>
+ </table>
+ <div class="result"></div>
+</form>
+<hr>
+<b>Generate Token:</b><br/>
+<form action="/nxt" method="POST" onsubmit="return submitForm(this);">
+ <input type="hidden" name="requestType" value="generateToken"/>
+ <table>
+ <tr>
+ <td>Website:</td>
+ <td><input type="text" name="website"/></td>
+ </tr>
+ <tr>
+ <td>Secret Phrase:</td>
+ <td><input type="password" name="secretPhrase"/></td>
+ </tr>
+ <tr>
+ <td colspan="2"><input type="submit" value="submit"/></td>
+ </tr>
+ </table>
+ <div class="result"></div>
+</form>
+<hr>
+<b>Verify Token:</b><br/>
+<form action="/nxt" method="POST" onsubmit="return submitForm(this);">
+ <input type="hidden" name="requestType" value="decodeToken"/>
+ <table>
+ <tr>
+ <td>Token:</td>
+ <td><input type="text" name="token"/></td>
+ </tr>
+ <tr>
+ <td>Website:</td>
+ <td><input type="text" name="website"/></td>
+ </tr>
+ <tr>
+ <td colspan="2"><input type="submit" value="submit"/></td>
+ </tr>
+ </table>
+ <div class="result"></div>
+</form>
+<hr>
+<b>Get Peers:</b><br/>
+<form action="/nxt" method="POST" onsubmit="return submitForm(this);">
+ <input type="hidden" name="requestType" value="getPeers"/>
+ <table>
+ <tr>
+ <td colspan="2"><input type="submit" value="submit"/></td>
+ </tr>
+ </table>
+ <div class="result"></div>
+</form>
+<hr>
+<b>Get Peer Info:</b><br/>
+<form action="/nxt" method="POST" onsubmit="return submitForm(this);">
+ <input type="hidden" name="requestType" value="getPeer"/>
+ <table>
+ <tr>
+ <td>Peer:</td>
+ <td><input type="text" name="peer"/></td>
+ </tr>
+ <tr>
+ <td colspan="2"><input type="submit" value="submit"/></td>
+ </tr>
+ </table>
+ <div class="result"></div>
+</form>
+<hr>
+<b>Get State:</b><br/>
+<form action="/nxt" method="POST" onsubmit="return submitForm(this);">
+ <input type="hidden" name="requestType" value="getState"/>
+ <table>
+ <tr>
+ <td colspan="2"><input type="submit" value="submit"/></td>
+ </tr>
+ </table>
+ <div class="result"></div>
+</form>
+<hr>
+<b>Get Account:</b><br/>
+<form action="/nxt" method="POST" onsubmit="return submitForm(this);">
+ <input type="hidden" name="requestType" value="getAccount"/>
+ <table>
+ <tr>
+ <td>Account:</td>
+ <td><input type="text" name="account"/></td>
+ </tr>
+ <tr>
+ <td colspan="2"><input type="submit" value="submit"/></td>
+ </tr>
+ </table>
+ <div class="result"></div>
+</form>
+<hr>
+<b>Get Multiple Account Balances:</b><br/>
+<form action="/nxt" method="GET" onsubmit="return getAccountBalances(this);">
+ <table>
+ <tr>
+ <td>Accounts (enter one per line):</td>
+ <td><textarea name="accounts" style="width: 100%; height: auto;" rows="6"></textarea></td>
+ </tr>
+ <tr><td colspan="2"><div class="result"></div></td></tr>
+ <tr>
+ <td colspan="2"><input type="submit" value="submit"/></td>
+ </tr>
+ </table>
+</form>
+<hr>
+<b>Get Guaranteed Account Balance:</b><br/>
+<form action="/nxt" method="POST" onsubmit="return submitForm(this);">
+ <input type="hidden" name="requestType" value="getGuaranteedBalance"/>
+ <table>
+ <tr>
+ <td>Account:</td>
+ <td><input type="text" name="account"/></td>
+ </tr>
+ <tr>
+ <td>Number of confirmations:</td>
+ <td><input type="number" name="numberOfConfirmations"/></td>
+ </tr>
+ <tr>
+ <td colspan="2"><input type="submit" value="submit"/></td>
+ </tr>
+ </table>
+ <div class="result"></div>
+</form>
+<hr>
+<b>Get Account Aliases:</b><br/>
+<form action="/nxt" method="POST" onsubmit="return submitForm(this);">
+ <input type="hidden" name="requestType" value="getAliases"/>
+ <table>
+ <tr>
+ <td>Account:</td>
+ <td><input type="text" name="account"/></td>
+ </tr>
+ <tr>
+ <td colspan="2"><input type="submit" value="submit"/></td>
+ </tr>
+ </table>
+ <div class="result"></div>
+</form>
+<hr>
+<b>Get Alias:</b><br/>
+<form action="/nxt" method="POST" onsubmit="return submitForm(this);">
+ <input type="hidden" name="requestType" value="getAlias"/>
+ <table>
+ <tr>
+ <td>Alias:</td>
+ <td><input type="text" name="aliasName"/></td>
+ </tr>
+ <tr>
+ <td colspan="2"><input type="submit" value="submit"/></td>
+ </tr>
+ </table>
+ <div class="result"></div>
+</form>
+</body>
+</html>
Oops, something went wrong.

0 comments on commit d2572ea

Please sign in to comment.