mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 14:35:52 +00:00
Merge branch 'master' of github.com:jedmccaleb/NewCoin
This commit is contained in:
17
bin/email_hash.js
Executable file
17
bin/email_hash.js
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/node
|
||||||
|
//
|
||||||
|
// Returns a Gravatar stle hash as per: http://en.gravatar.com/site/implement/hash/
|
||||||
|
//
|
||||||
|
|
||||||
|
if (process.argv.length != 3) {
|
||||||
|
process.stderr.write("Usage: " + process.argv[1] + " email_address\n\nReturns gravitar style hash.\n");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
var md5 = require('crypto').createHash('md5');
|
||||||
|
|
||||||
|
md5.update(process.argv[2].trim().toLowerCase());
|
||||||
|
|
||||||
|
process.stdout.write(md5.digest('hex') + "\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
// vim:sw=2:sts=2:ts=8:et
|
||||||
22
bin/hexify.js
Executable file
22
bin/hexify.js
Executable file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/node
|
||||||
|
//
|
||||||
|
// Returns hex of lowercasing a string.
|
||||||
|
//
|
||||||
|
|
||||||
|
var stringToHex = function (s) {
|
||||||
|
return Array.prototype.map.call(s, function (c) {
|
||||||
|
var b = c.charCodeAt(0);
|
||||||
|
|
||||||
|
return b < 16 ? "0" + b.toString(16) : b.toString(16);
|
||||||
|
}).join("");
|
||||||
|
};
|
||||||
|
|
||||||
|
if (process.argv.length != 3) {
|
||||||
|
process.stderr.write("Usage: " + process.argv[1] + " string\n\nReturns hex of lowercasing string.\n");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
process.stdout.write(stringToHex(process.argv[2].toLowerCase()) + "\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
// vim:sw=2:sts=2:ts=8:et
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
#
|
#
|
||||||
# [ips]:
|
# [ips]:
|
||||||
# Only valid in "rippled.cfg", "ripple.txt", and the referered [ips_url].
|
# Only valid in "rippled.cfg", "ripple.txt", and the referered [ips_url].
|
||||||
# List of ips where the Newcoin protocol is avialable.
|
# List of ips where the Ripple protocol is avialable.
|
||||||
# One ipv4 or ipv6 address per line.
|
# One ipv4 or ipv6 address per line.
|
||||||
# A port may optionally be specified after adding a space to the address.
|
# A port may optionally be specified after adding a space to the address.
|
||||||
# By convention, if known, IPs are listed in from most to least trusted.
|
# By convention, if known, IPs are listed in from most to least trusted.
|
||||||
|
|||||||
@@ -274,7 +274,6 @@ void Config::load()
|
|||||||
sectionSingleB(secConfig, SECTION_WEBSOCKET_SSL_CERT, WEBSOCKET_SSL_CERT);
|
sectionSingleB(secConfig, SECTION_WEBSOCKET_SSL_CERT, WEBSOCKET_SSL_CERT);
|
||||||
sectionSingleB(secConfig, SECTION_WEBSOCKET_SSL_CHAIN, WEBSOCKET_SSL_CHAIN);
|
sectionSingleB(secConfig, SECTION_WEBSOCKET_SSL_CHAIN, WEBSOCKET_SSL_CHAIN);
|
||||||
sectionSingleB(secConfig, SECTION_WEBSOCKET_SSL_KEY, WEBSOCKET_SSL_KEY);
|
sectionSingleB(secConfig, SECTION_WEBSOCKET_SSL_KEY, WEBSOCKET_SSL_KEY);
|
||||||
|
|
||||||
|
|
||||||
if (sectionSingleB(secConfig, SECTION_VALIDATION_SEED, strTemp))
|
if (sectionSingleB(secConfig, SECTION_VALIDATION_SEED, strTemp))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1006,7 +1006,9 @@ Json::Value RPCHandler::doSubmit(Json::Value jvRequest)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!txJSON.isMember("Fee")
|
if (!txJSON.isMember("Fee")
|
||||||
&& ("OfferCreate" == txJSON["TransactionType"].asString()
|
&& (
|
||||||
|
"AccountSet" == txJSON["TransactionType"].asString()
|
||||||
|
|| "OfferCreate" == txJSON["TransactionType"].asString()
|
||||||
|| "OfferCancel" == txJSON["TransactionType"].asString()
|
|| "OfferCancel" == txJSON["TransactionType"].asString()
|
||||||
|| "TrustSet" == txJSON["TransactionType"].asString()))
|
|| "TrustSet" == txJSON["TransactionType"].asString()))
|
||||||
{
|
{
|
||||||
@@ -1353,8 +1355,10 @@ Json::Value RPCHandler::doAccountTransactions(Json::Value jvRequest)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// {
|
// {
|
||||||
// secret: <string>
|
// secret: <string> // optional
|
||||||
// }
|
// }
|
||||||
|
//
|
||||||
|
// This command requires admin access because it makes no sense to ask an untrusted server for this.
|
||||||
Json::Value RPCHandler::doValidationCreate(Json::Value jvRequest) {
|
Json::Value RPCHandler::doValidationCreate(Json::Value jvRequest) {
|
||||||
RippleAddress raSeed;
|
RippleAddress raSeed;
|
||||||
Json::Value obj(Json::objectValue);
|
Json::Value obj(Json::objectValue);
|
||||||
@@ -1518,6 +1522,7 @@ Json::Value RPCHandler::doWalletPropose(Json::Value jvRequest)
|
|||||||
Json::Value obj(Json::objectValue);
|
Json::Value obj(Json::objectValue);
|
||||||
|
|
||||||
obj["master_seed"] = naSeed.humanSeed();
|
obj["master_seed"] = naSeed.humanSeed();
|
||||||
|
obj["master_seed_hex"] = naSeed.getSeed().ToString();
|
||||||
//obj["master_key"] = naSeed.humanSeed1751();
|
//obj["master_key"] = naSeed.humanSeed1751();
|
||||||
obj["account_id"] = naAccount.humanAccountID();
|
obj["account_id"] = naAccount.humanAccountID();
|
||||||
|
|
||||||
@@ -2455,7 +2460,7 @@ Json::Value RPCHandler::doCommand(Json::Value& jvRequest, int iRole)
|
|||||||
{ "unl_reset", &RPCHandler::doUnlReset, true, optNone },
|
{ "unl_reset", &RPCHandler::doUnlReset, true, optNone },
|
||||||
{ "unl_score", &RPCHandler::doUnlScore, true, optNone },
|
{ "unl_score", &RPCHandler::doUnlScore, true, optNone },
|
||||||
|
|
||||||
{ "validation_create", &RPCHandler::doValidationCreate, false, optNone },
|
{ "validation_create", &RPCHandler::doValidationCreate, true, optNone },
|
||||||
{ "validation_seed", &RPCHandler::doValidationSeed, false, optNone },
|
{ "validation_seed", &RPCHandler::doValidationSeed, false, optNone },
|
||||||
|
|
||||||
{ "wallet_accounts", &RPCHandler::doWalletAccounts, false, optCurrent },
|
{ "wallet_accounts", &RPCHandler::doWalletAccounts, false, optCurrent },
|
||||||
|
|||||||
@@ -20,9 +20,6 @@ var serverDelay = 1500;
|
|||||||
|
|
||||||
buster.testRunner.timeout = 5000;
|
buster.testRunner.timeout = 5000;
|
||||||
|
|
||||||
var HttpServer = function () {
|
|
||||||
};
|
|
||||||
|
|
||||||
var server;
|
var server;
|
||||||
var server_events;
|
var server_events;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user