Skip to content

Commit

Permalink
Fix: Removed getblocks that no longer exists and created get in trans…
Browse files Browse the repository at this point in the history
…actions
  • Loading branch information
henriqueaklein committed Dec 12, 2024
1 parent 1e592c2 commit c62615c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 7 additions & 9 deletions src/GeniusSDK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand All @@ -169,20 +173,14 @@ 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 );
}

GeniusAddress GeniusSDKGetAddress()
{
auto address = GeniusNodeInstance->GetAddress();
auto address = GeniusNodeInstance->GetAddress<std::string>();

GeniusAddress ret;

Expand Down
16 changes: 9 additions & 7 deletions src/GeniusSDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit c62615c

Please sign in to comment.