![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
blockchain , sdchain cpp sdk and demo
Dependencies: EthernetInterface mbed-rtos mbed uniqueCPUID
Fork of bcsdk by
Account.h
- Committer:
- MrAI
- Date:
- 2018-05-16
- Revision:
- 12:1b24ea479a59
- Parent:
- 10:aabd720e632c
File content as of revision 12:1b24ea479a59:
/*********************************************************************** * Module: Account.h * Author: Administrator * Modified: 2017Äê8ÔÂ18ÈÕ 11:06:20 * Purpose: Declaration of the class Account * Comment: ÕË»§ ***********************************************************************/ #if !defined(__Account_Account_h) #define __Account_Account_h #include <string> #include <map> #include "Key.h" #include "Object.h" #include "MbedJSONValue.h" using namespace std; class Account { public: Account(); Account(Key &key); ~Account(); std::string id; std::string alias; //Key* keys; int quorum; map<std::string,Object> tags; void setId(const string newId){this->id = newId;}; string getId(){return this->id;}; void setAlias(const string newAlias){this->alias = newAlias;}; string getAlias(){return this->alias;}; void setQuorum(int newQuorum){this->quorum = newQuorum;}; int getQuorum(){return this->quorum;}; string getBalance(); string getWallet(); string createAccount(); string listAccounts(); string getParseMbedJson(MbedJSONValue& out, const char * pos);//ת»»³ÉMbedjson¸ñʽ bool getRequestRet(MbedJSONValue& in);//»ñÈ¡½»Ò׳ɹ¦±êÖ¾ string getKeyValue(MbedJSONValue& in, string Key1, string Key2);//»ñÈ¡¼üÖµ string getKeyValue(MbedJSONValue& in, string Key1); bool getKeyValueBool(MbedJSONValue& in, string Key1, string Key2); bool getKeyValueBool(MbedJSONValue& in, string Key1); int getKeyValueInt(MbedJSONValue& in, string Key1, string Key2); double getKeyValuedouble(MbedJSONValue& in, string Key1, string Key2); int getLedger(MbedJSONValue& in);//»ñÈ¡Ledger³¤¶È int getBalanceSize(MbedJSONValue& in,string Key1);//»ñÈ¡Óà¶î¶ÔÏóÊý×é´óС int getBalanceSize(MbedJSONValue& in, string Key1,string Key2); string getBalanceArray(MbedJSONValue& in, string Key1, int i, string Key2);//»ñÈ¡Óà¶îÊý¾Ý string getBalanceArray(MbedJSONValue& in, string Key1, string Key2, int i, string Key3); string getBalanceArray(MbedJSONValue& in, string Key1, string Key2, string Key3, int i, string Key4); protected: private: Client client; MbedJSONValue m_valTags; Key m_Keys; }; #endif