-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Daves-MacBook-Pro:build daveappleton$ sudo ./stellard --conf stellar.cfg -a create_keys
Loading: "stellar.cfg"
Connecting to: 127.0.0.1:5005
{
"error" : "internal",
"error_code" : 62,
"error_message" : "Internal error.",
"error_what" : "no response from server"
}
-
actually you do not need to start the engine to create keys.
-
the code below works in main()
int iResult = 0;
RippleAddress naSeed;
std::cout << "Dave's Hacked Version" << std::endl;
if (! RandomNumbers::getInstance ().initialize ()) {
std::cout << "Unable to add system entropy" << std::endl ;
return -1;
}
// next bit is from my implementation - you will need to get the passphrase
if (argc < 2)
naSeed.setSeedRandom ();
else
if (!naSeed.setSeedGeneric (argv[1])) {
std::cout << "Bad passphrase" << std::endl;
return -1;
}
RippleAddress naAccount = RippleAddress::createAccountPublic(naSeed);
Json::Value obj (Json::objectValue);
obj["master_seed"] = naSeed.humanSeed ();
obj["account_id"] = naAccount.humanAccountID ();
obj["public_key"] = naAccount.humanAccountPublic();//obj["master_seed_hex"] = to_string (naSeed.getSeed ());
//auto acct = naAccount.getAccountPublic();
//obj["public_key_hex"] = strHex(acct.begin(), acct.size());std::cout << "account ID : " << obj["account_id"]<< std::endl;
std::cout << "private key : " << obj["master_seed"]<< std::endl;
std::cout << "public key : " << obj["public_key"]<< std::endl;