From c62615c66fd804d352225e4e6461fde36e3023b7 Mon Sep 17 00:00:00 2001 From: Henrique A Klein Date: Thu, 12 Dec 2024 14:02:54 -0300 Subject: [PATCH] Fix: Removed getblocks that no longer exists and created get in transactions --- src/GeniusSDK.cpp | 16 +++++++--------- src/GeniusSDK.h | 16 +++++++++------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/GeniusSDK.cpp b/src/GeniusSDK.cpp index f1b5e2f..5dd848c 100644 --- a/src/GeniusSDK.cpp +++ b/src/GeniusSDK.cpp @@ -155,9 +155,13 @@ uint64_t GeniusSDKGetBalance() return GeniusNodeInstance->GetBalance(); } -GeniusMatrix GeniusSDKGetTransactions() +GeniusMatrix GeniusSDKGetOutTransactions() { - return matrix_from_vector_of_vector( GeniusNodeInstance->GetTransactions() ); + return matrix_from_vector_of_vector( GeniusNodeInstance->GetOutTransactions() ); +} +GeniusMatrix GeniusSDKGetInTransactions() +{ + return matrix_from_vector_of_vector( GeniusNodeInstance->GetInTransactions() ); } void GeniusSDKFreeTransactions( GeniusMatrix matrix ) @@ -169,12 +173,6 @@ void GeniusSDKFreeTransactions( GeniusMatrix matrix ) free( matrix.ptr ); } -GeniusMatrix GeniusSDKGetBlocks() -{ - auto blocks = GeniusNodeInstance->GetBlocks(); - return matrix_from_buffer( blocks ); -} - void GeniusSDKMintTokens( uint64_t amount, const char *transaction_hash, const char *chain_id, const char *token_id ) { GeniusNodeInstance->MintTokens( amount, transaction_hash, chain_id, token_id ); @@ -182,7 +180,7 @@ void GeniusSDKMintTokens( uint64_t amount, const char *transaction_hash, const c GeniusAddress GeniusSDKGetAddress() { - auto address = GeniusNodeInstance->GetAddress(); + auto address = GeniusNodeInstance->GetAddress(); GeniusAddress ret; diff --git a/src/GeniusSDK.h b/src/GeniusSDK.h index b430423..ab05de3 100644 --- a/src/GeniusSDK.h +++ b/src/GeniusSDK.h @@ -50,15 +50,17 @@ typedef struct } GeniusAddress; typedef char JsonData_t[1024]; ///< ID/Path of the image to be processed -typedef uint64_t PayAmount_t; ///< Amount to be paid for the processing +typedef uint64_t PayAmount_t; ///< Amount to be paid for the processing -GNUS_VISIBILITY_DEFAULT const char *GeniusSDKInit( const char *base_path, const char *eth_private_key, bool autodht, bool process ); -GNUS_VISIBILITY_DEFAULT void GeniusSDKProcess( const JsonData_t jsondata ); -GNUS_VISIBILITY_DEFAULT uint64_t GeniusSDKGetBalance(); -GNUS_VISIBILITY_DEFAULT GeniusMatrix GeniusSDKGetTransactions(); +GNUS_VISIBILITY_DEFAULT const char *GeniusSDKInit( const char *base_path, const char *eth_private_key, bool autodht, + bool process ); +GNUS_VISIBILITY_DEFAULT void GeniusSDKProcess( const JsonData_t jsondata ); +GNUS_VISIBILITY_DEFAULT uint64_t GeniusSDKGetBalance(); +GNUS_VISIBILITY_DEFAULT GeniusMatrix GeniusSDKGetOutTransactions(); +GNUS_VISIBILITY_DEFAULT GeniusMatrix GeniusSDKGetInTransactions(); GNUS_VISIBILITY_DEFAULT void GeniusSDKFreeTransactions( GeniusMatrix matrix ); -GNUS_VISIBILITY_DEFAULT GeniusMatrix GeniusSDKGetBlocks(); -GNUS_VISIBILITY_DEFAULT void GeniusSDKMintTokens( uint64_t amount, const char *transaction_hash, const char *chain_id, const char *token_id ); +GNUS_VISIBILITY_DEFAULT void GeniusSDKMintTokens( uint64_t amount, const char *transaction_hash, const char *chain_id, + const char *token_id ); GNUS_VISIBILITY_DEFAULT GeniusAddress GeniusSDKGetAddress(); GNUS_VISIBILITY_DEFAULT bool GeniusSDKTransferTokens( uint64_t amount, GeniusAddress *dest ); GNUS_VISIBILITY_DEFAULT uint64_t GeniusSDKGetCost( const JsonData_t jsondata );