blockchain , sdchain cpp sdk and demo

Dependencies:   EthernetInterface mbed-rtos mbed uniqueCPUID

Fork of bcsdk by SDchain C Plus Plus Team

Committer:
webmaster
Date:
Wed Aug 08 09:51:32 2018 +0800
Revision:
18:ec6cd7cfe3f8
Parent:
16:50646cf2e9a0
rm demo files

Who changed what in which revision?

UserRevisionLine numberNew contents of line
webmaster 8:f2a567ee3a46 1 #include "UnitTest.h"
webmaster 8:f2a567ee3a46 2 #include "BlockChain.h"
webmaster 8:f2a567ee3a46 3
webmaster 8:f2a567ee3a46 4 int test_bc()
webmaster 8:f2a567ee3a46 5 {
webmaster 8:f2a567ee3a46 6
webmaster 8:f2a567ee3a46 7
webmaster 8:f2a567ee3a46 8 string strRep;
webmaster 8:f2a567ee3a46 9
webmaster 16:50646cf2e9a0 10 /* strRep = "";
webmaster 8:f2a567ee3a46 11 http_post_bc(strInfo,strRep);
webmaster 8:f2a567ee3a46 12 cout<<"#####strRep: "<<strRep.c_str()<<endl;
webmaster 8:f2a567ee3a46 13
webmaster 8:f2a567ee3a46 14 strRep = "";
webmaster 8:f2a567ee3a46 15 http_post_bc(strCreateKey,strRep);
webmaster 8:f2a567ee3a46 16 cout<<"#####strRep: "<<strRep.c_str()<<endl;
webmaster 8:f2a567ee3a46 17
webmaster 8:f2a567ee3a46 18 strRep = "";
webmaster 8:f2a567ee3a46 19 http_post_bc(strCreateAccount,strRep);
webmaster 16:50646cf2e9a0 20 cout<<"#####strRep: "<<strRep.c_str()<<endl; */
webmaster 8:f2a567ee3a46 21
webmaster 8:f2a567ee3a46 22 return 0;
webmaster 8:f2a567ee3a46 23 }
webmaster 8:f2a567ee3a46 24
webmaster 8:f2a567ee3a46 25
webmaster 8:f2a567ee3a46 26 int http_get()
webmaster 8:f2a567ee3a46 27 {
webmaster 8:f2a567ee3a46 28 // GET https://api.connector.mbed.com/endpoints/?type=helloworld HTTP/1.1
webmaster 8:f2a567ee3a46 29 // HOST: https://api.connector.mbed.com
webmaster 8:f2a567ee3a46 30 // Content-Type: ; charset=UTF-8
webmaster 8:f2a567ee3a46 31 // Connection: keep-alive
webmaster 8:f2a567ee3a46 32 // Pragma: no-cache
webmaster 8:f2a567ee3a46 33 // Cache-Control: no-cache
webmaster 8:f2a567ee3a46 34 // X-Requested-With: XMLHttpRequest
webmaster 8:f2a567ee3a46 35 return 0;
webmaster 8:f2a567ee3a46 36 }
webmaster 8:f2a567ee3a46 37
webmaster 8:f2a567ee3a46 38