mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
first
This commit is contained in:
44
Wallet.h
Normal file
44
Wallet.h
Normal file
@@ -0,0 +1,44 @@
|
||||
#ifndef __WALLET__
|
||||
#define __WALLET__
|
||||
|
||||
#include "keystore.h"
|
||||
#include "newcoin.pb.h"
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
class NewcoinAddress;
|
||||
|
||||
/*
|
||||
Keeps track of all the public/private keys you have created
|
||||
*/
|
||||
class Wallet : public CBasicKeyStore
|
||||
{
|
||||
class Account
|
||||
{
|
||||
public:
|
||||
//CKey mKey;
|
||||
std::string mAddress;
|
||||
//std::vector<unsigned char> mPublicKey;
|
||||
//std::vector<unsigned char> mPrivateKey;
|
||||
uint64 mAmount;
|
||||
uint64 mAge;
|
||||
Account(){}
|
||||
};
|
||||
std::list<Account> mYourAccounts;
|
||||
|
||||
bool signTransInput(uint256 hash, newcoin::TransInput& input,std::vector<unsigned char>& retSig);
|
||||
uint256 calcTransactionHash(newcoin::Transaction& trans);
|
||||
|
||||
bool createTransaction(NewcoinAddress& destAddress, uint64 amount,newcoin::Transaction& trans);
|
||||
bool commitTransaction(newcoin::Transaction& trans);
|
||||
public:
|
||||
Wallet();
|
||||
void load();
|
||||
|
||||
uint64 getBalance();
|
||||
|
||||
// returns some human error str?
|
||||
std::string sendMoneyToAddress(NewcoinAddress& destAddress, uint64 amount);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user