<prompt> Tengeneza programu ya C inayoiga mfumo wa msingi wa blockchain. Programu inapaswa kujumuisha utendakazi wa kuunda vizuizi, kuongeza miamala, kuhalalisha mnyororo, na kuchimba vizuizi vipya.PLINFORMAT  <response>: pamoja na pamoja na pamoja na pamoja na pamoja na pamoja na pamoja na pamoja na Muamala wa darasa umma: std:: mtumaji wa kamba; std::mpokeaji wa kamba; kiasi mara mbili; Muamala consst std::string mtumaji, const std::string receiver, kiasi mara mbili : mtumajimtumaji, mpokeajimpokeaji, kiasikiasi ;Kizuizi cha darasa Privat: int index; time_t muhuri wa saa; std::vector shughuli; std::string prevHash; std::heshi ya kamba; int nonce; std::string countHash const std::stringstream ss; ss index timestamp transactionString prevHash nonce; rudisha sha256ss.str; std::string transactionString const std::stringstream ss; kwa const auto tx : shughuli ss tx.sender tx.receiver tx.amount; rudisha ss.str; tuli std::string sha256const std::string data muhtasari wa char ambao haujatiwa sahihiSHA256_DIGEST_LENGTH; SHA256_CTX ctx; SHA256_Initctx; SHA256_Sasishactx, data.c_str, data.size; SHA256_Finaldigest, ctx; std::stringstream ss; kwa int i 0; i SHA256_DIGEST_LENGTH; i ss std::hex std::setw2 std::setfill0 intdigesti; rudisha ss.str; umma: Zuia in index, const std::vector shughuli, const std::string prevHash : indexindex, muhuri wa mudastd::timenullptr, miamalashughuli, prevHashprevHash, nonce0 heshi hesabuHash; utupu mineBlock int ugumu std::lengo la kamba ugumu, 0; wakati hash.substr0, ugumu ! lengo nonce; heshi hesabuHash; std::cout Block inachimbwa: hash std::endl; int getIndex const return index; time_t getTimestamp const rudisha muhuri wa muda; const std::vector getTransactions const rejesha miamala; const std::string getPrevHash const return prevHash; const std::string getHash const return hash; ;darasa blockchain Privat: std::vector mnyororo; ugumu wa int;umma: Blockchainint ugumu : ugumuugumu std::vector genesisTransactions; genesisTransactions.emplace_backmtumaji1, mpokeaji1, 50; chain.emplace_back0, genesisTransactions, 0; void addBlockconst std::vector transactions chain.emplace_backchain.size, transactions, chain.back.getHash; mnyororo.nyuma.Kizuizi cha mgodiugumu; bool isValid const kwa size_t i 1; i shughuli1; shughuli1.emplace_backmtuma2, receiver2, 100; blockchain.addBlockshughuli1; std::vector shughuli2; transactions2.emplace_backmtuma3, receiver3, 150; blockchain.addBlockshughuli2; ikiwa blockchain.isValid std::cout Blockchain ni halali std::endl; nyengine std::cout Blockchain si halali std::endl; kurudi 0; 