SDchain C Plus Plus Team / Mbed 2 deprecated bcsdk

Dependencies:   EthernetInterface mbed-rtos mbed uniqueCPUID

Fork of bcsdk by Heng Well

Revision:
10:aabd720e632c
Parent:
8:f2a567ee3a46
--- a/MockHsm.cpp	Wed Sep 27 01:18:12 2017 +0000
+++ b/MockHsm.cpp	Fri Nov 03 01:07:32 2017 +0000
@@ -1,10 +1,14 @@
 #include "MockHsm.h"
-
+//#include "Uuid.h"
 
 MockHsm::MockHsm()
 {
+// 	Uuid u;
+// 	GUID guid = u.CreateGuid();
+// 	string strUuid = u.GuidToString(guid);
+
 	alias = "";
-	client_token = "962cd39d-6496-4b23-a2c5-85e445069a78"; 
+	client_token = "962cd39d-6496-4b23-a2c5-85e445069a12"; 
 }
 
 MockHsm::~MockHsm()
@@ -39,7 +43,7 @@
 	printf("json: %s\r\n", strJson.c_str());
 
 	string strRep = "";
-	string strUrl = "/create-key";
+	string strUrl = "/mockhsm/create-key";
 	client.http_post(strUrl,strJson,strRep);
 	//cout<< "HTTP Response:\n" << strRep.length() << endl << strRep.c_str() << endl;
 
@@ -67,3 +71,23 @@
 
 	return strJson;
 }
+
+
+string MockHsm::listTransactionFeeds()
+{
+	string strJson = "";
+
+	MbedJSONValue val;
+
+	strJson = val.serialize();
+	if ("null" == strJson)
+	{
+		strJson = "{}";
+	}
+
+	string strRep = "";
+	string strUrl = "/list-transaction-feeds";
+	client.http_post(strUrl,strJson,strRep);
+
+	return strJson;
+}
\ No newline at end of file