mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Some cleanups and missing details.
This commit is contained in:
13
Wallet.h
13
Wallet.h
@@ -15,6 +15,8 @@ Keeps track of all the public/private keys you have created
|
|||||||
class LocalAccount
|
class LocalAccount
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
typedef boost::shared_ptr<LocalAccount> pointer;
|
||||||
|
|
||||||
//CKey mKey;
|
//CKey mKey;
|
||||||
//std::string mHumanAddress;
|
//std::string mHumanAddress;
|
||||||
NewcoinAddress mAddress;
|
NewcoinAddress mAddress;
|
||||||
@@ -25,6 +27,7 @@ public:
|
|||||||
uint32 mSeqNum;
|
uint32 mSeqNum;
|
||||||
|
|
||||||
LocalAccount(bool); // create a new local acount
|
LocalAccount(bool); // create a new local acount
|
||||||
|
|
||||||
bool signRaw(Serializer::pointer);
|
bool signRaw(Serializer::pointer);
|
||||||
bool signRaw(Serializer::pointer, std::vector<unsigned char>& signature);
|
bool signRaw(Serializer::pointer, std::vector<unsigned char>& signature);
|
||||||
bool checkSignRaw(Serializer::pointer, int signaturePosition=-1, int signedData=-1);
|
bool checkSignRaw(Serializer::pointer, int signaturePosition=-1, int signedData=-1);
|
||||||
@@ -36,11 +39,9 @@ public:
|
|||||||
|
|
||||||
class Wallet : public CBasicKeyStore
|
class Wallet : public CBasicKeyStore
|
||||||
{
|
{
|
||||||
std::list<LocalAccount> mYourAccounts;
|
std::map<uint160, LocalAccount::pointer> mYourAccounts;
|
||||||
|
|
||||||
|
Transaction::pointer createTransaction(LocalAccount& fromAccount, const uint160& destAddr, uint64 amount);
|
||||||
|
|
||||||
Transaction::pointer createTransaction(LocalAccount& fromAccount, uint160& destAddr, int64 amount);
|
|
||||||
bool commitTransaction(Transaction::pointer trans);
|
bool commitTransaction(Transaction::pointer trans);
|
||||||
|
|
||||||
LocalAccount* consolidateAccountOfSize(int64 amount);
|
LocalAccount* consolidateAccountOfSize(int64 amount);
|
||||||
@@ -50,10 +51,10 @@ public:
|
|||||||
void refreshAccounts();
|
void refreshAccounts();
|
||||||
void load();
|
void load();
|
||||||
|
|
||||||
int64 getBalance();
|
uint64 getBalance();
|
||||||
|
|
||||||
// returns some human error str?
|
// returns some human error str?
|
||||||
std::string sendMoneyToAddress(uint160& destAddress, int64 amount);
|
std::string sendMoneyToAddress(const uint160& destAddress, uint64 amount);
|
||||||
|
|
||||||
// you may need to update your balances
|
// you may need to update your balances
|
||||||
void transactionChanged(Transaction::pointer trans);
|
void transactionChanged(Transaction::pointer trans);
|
||||||
|
|||||||
Reference in New Issue
Block a user