mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
New wallet system. Still missing unit tests, ledger synchronization,
and SQL code. This uses some of the 'magic' properties of elliptic curves to create related families of public and private keys. Wallet encryption is not needed because the private keys do not need to be stored.
This commit is contained in:
@@ -32,9 +32,14 @@ Application::Application()
|
||||
mRPCDoor=NULL;
|
||||
mDatabase=NULL;
|
||||
|
||||
CKey::pointer account_key(new CKey(CKey::GetBaseFromString("This is my payphrase."), 0, false));
|
||||
|
||||
Ledger::pointer firstLedger(new Ledger(account_key->GetAddress().GetHash160(), 1000000));
|
||||
uint160 rootFamily=mWallet.addFamily("This is my payphrase.", true);
|
||||
LocalAccount::pointer rootAccount=mWallet.getLocalAccount(rootFamily, 0);
|
||||
assert(!!rootAccount);
|
||||
uint160 rootAddress=rootAccount->getAddress();
|
||||
assert(!!rootAddress);
|
||||
|
||||
Ledger::pointer firstLedger(new Ledger(rootAddress, 1000000));
|
||||
firstLedger->setClosed();
|
||||
firstLedger->setAccepted();
|
||||
mMasterLedger.pushLedger(firstLedger);
|
||||
|
||||
Reference in New Issue
Block a user